way has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks

I've a script that after a couple of hours working it grow up at 10GiB of memory, in theory, this shouldn't be happend

I've seen the ptkdb, Devel::Size and Devel::Dumpsize but i looking for some "type" of pragma that show me all variable size, becouse i have too much code.

Thank

Replies are listed 'Best First'.
Re: Large Memory
by weismat (Friar) on Dec 22, 2008 at 14:20 UTC
    Do you have circular references so that the garbage collector is not cleaning up - circular references can lead to so a memory growth. This is the most likely reason.
    Another potential sources are external libraries, e.g. I have seen huge leaks with WWW-Mechanize. These are not really traceabl
    I would go through the code and check everything which should be collected. From my pov there is no pragma which will help you.

      OK, i guess so that I must check each variable manually, Thank you so much