Dear Reverends and God-Father of Perl

I am working with Perl 5.8.8 (ActiveState) under windows.

I have serious memory problems, although I allways use strict.pm (working only with local vars 'me $var') and do not use global vars. The program I've written has about 40000 Lines in more than 100 packages.

Do you know a good Package for searching memory leaks under Windows XP and perl version 5.8.8.

I would like to have something like the Devel::Symdump does to produce a list of all variables whose size has changed or are new allocated between two program-positions:

my $memdump = MemoryDump->new(); anyFunction(); print $memdump->diff(MemoryDump->new();

Exist something like that for ActiveState-Perl?

Thank you a lot for you response.

Update:

Thank you for your responses.

I've tried to install Devel::LeakTrace, but it does not work because I am working with a company-computer that prevents me to update any program (and I do not want bypass the restriction). So I've found that for counting References of objects the allready installed package 'B' works fine.

my $anon = []; my $otherref = $anon; my $refcount = B::svref_2object($anon)->REFCNT(); # => 2

Also the package 'Devel::Symdump' could I use, to trace the symbol-table. I've copied it into my private Class-Folder

I will inform you about as soon as I found the solution about my memory-leak. (And the way I've found it)


In reply to Memory Leak Package by Bauldric

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.