[Haskell-cafe] space leak with 'concat' ?

Henning Thielemann lemming at henning-thielemann.de
Tue Jan 27 16:12:38 EST 2009


$ ghc +RTS -M16m -c30 -RTS -e 'concat $ repeat "bla"'

This breaks down after a while, also if I increase the memory restriction:

...
ablablablablablablablablablablablablablablablablablablablablablaHeap exhausted;
Current maximum heap size is 15998976 bytes (15 Mb);
use `+RTS -M<size>' to increase it.


Whereas this one works:

$ ghc +RTS -M16m -c30 -RTS -e 'cycle "bla"'



'concat' seems to be the culprit. What's so bad about it?


More information about the Haskell-Cafe mailing list