[Haskell-cafe] "Out of memory" if compiled with -O2, why?
bulat.ziganshin at gmail.com
Sat Dec 4 11:04:26 CET 2010
Wednesday, December 1, 2010, 8:54:58 PM, you wrote:
> I'm using ghc7 here. If I run your program with -O2, it takes 1943 MB of memory max.
> If I comment out everything except g then with -O2 it takes 1521 MB.
> I'm not sure where the extra 400 MB of memory are going.
i think, it's because memory isn't collected immediately, so in first
case you just have more garbage hanging around. if you need to measure
real workset of your program, you should apply very aggressive (and
slow) garbage collection settings
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe