Skip to content

RTS -K/-M options not honored

I have this program

main = print $ do x <- [ 0 .. 5 ] ; let { y = 5 - y } ; return y

I compile with ghc-6.10.1 --make

and I execute with +RTS -M10m -K10m

but still the executable quickly eats up all my memory.

(I know the program is silly but still it should crash gracefully.)

When I do the same thing with ghc-6.8.3, I get "Heap exhausted", as it should be.

Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information