
22 Jun
2013
22 Jun
'13
10:36 a.m.
Aleksey Uymanov
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.