Aleksey Uymanov <s9gf4ult <at> gmail.com> writes:

> Try to use heap profiling. There is very high probability that the
> problem is because of space leak.

Really? Would it help in the standard example:

main = print $ foldr (+) 0 [1 .. 100000000::Int]

this leaks space (that is, cannot run in small space)
only because it leaks closures, right?
but how I'm going to recognize them in the heap profile?

When I run the above with +RTS -K1G -M1G -h -p
I do indeed get heap overflow (instead of stack overflow)
but the heap profile shows an allocation of 30k bytes only.

- J.W.



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to