summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/T9579/OutOfHeap.hs
blob: 7f0b7d6f2bb77289753d17e4bac1b42d21eec305 (plain)
1
2
3
4
5
6
7
8
9
10
import qualified Data.Array.Unboxed as UA
import Data.Word

main :: IO ()
main = print (UA.listArray (1, 2^(20::Int)) (repeat 0)
              :: UA.UArray Int Word64)
       -- this unboxed array should at least take:
       --   2^20 * 64 bits
       -- = 8 * (2^20 bytes)
       -- = 8 MiB (in heap)