Hello Jason,
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,
Thank you, it is indeed very similar problem.
Nevertheless it seems that the lst function is not the direct reason, because:
1) if I inline lst (by hands), the problem is still there
2) size of the list is actially not so large - just 15 millions elements
I am almost sure that the reason is Map.fr
On Wed, Dec 1, 2010 at 6:23 AM, Dmitry Kulagin wrote:
> Hi,
>
> I have problems with memory leaks and can't find out how to avoid them.
> I tried to reduce sample to demonstrate the following problems:
> 1) when compiled without -O2 option, it iconsumes 1582MB (!) total memory
> 2) when compiled w
Hi, Dmitry
I recently had the same problem:
http://www.haskell.org/pipermail/haskell-cafe/2010-November/086450.html
Memory is taken by the list returned by your lst function wich is
being shared across g,h,i,j,k,l,m,n.
Apparently there is no safe and easy way to overcome this yet :(
--
Regards,
Hi,
I have problems with memory leaks and can't find out how to avoid them.
I tried to reduce sample to demonstrate the following problems:
1) when compiled without -O2 option, it iconsumes 1582MB (!) total memory
2) when compiled with -O2 option it terminates with "out of memory"
Actually I don'