[Haskell-cafe] Profiling makes memory leak go away? Is Haskell a practical language?

Oren Ben-Kiki haskell-oren at ben-kiki.org
Mon Apr 9 12:25:12 EDT 2007


Chasing down my memory leak I got into a weird situation where adding
a magic manual SCC section and compiling with -prof makes the leak
disappear. Now, I'll take any solution I can find - but this black
voodoo only works for the short program I created for investigating
the leak. It fails on the real program. Probably not enough
fingernails in the voodoo doll or something :-(

The code is in http://hpaste.org/1314#a1 if anyone at all is willing
to take pity on me and explain what I'm doing wrong.

This is the second system I tried writing in Haskell, and in both
cases I hit a brick wall due to uncontrollable memory consumption. I'm
just about ready to give up on Haskell as a practical language for
non-trivial tasks. I can achieve  the results I want in very short,
elegant code... and as such it will have a place in my toolbox for
various small tasks... but I lack the deep lore required to make it
behave well for "large" inputs. At this point I have to take it on
faith that it is even possible to do so in the first place :-(


More information about the Haskell-Cafe mailing list