Just for the record: there was a leak but this has been fixed between perl-5.9.1 and perl-5.9.2 (this fix appears to have been backported to perl-5.8.8).

Running the code of node Re^2: Help Diagnosing Memory Leak (with system("ps uh $$"); added) with 11 input files each contain 10_000 lines:

perl-5.8.2:
user      6611  0.0  0.0   3716  2224 pts/0    R+   13:35   0:00 /opt/perl/bin/perl582 code.pl
user      6611  109  2.2  96512 94912 pts/0    R+   13:35   0:02 /opt/perl/bin/perl582 code.pl

perl-5.8.3:
user      6618  0.0  0.0   3716  2228 pts/0    R+   13:35   0:00 /opt/perl/bin/perl583 code.pl
user      6618 76.0  2.2  96512 94912 pts/0    R+   13:35   0:02 /opt/perl/bin/perl583 code.pl

perl-5.8.4:
user      6621  0.0  0.0   3584  2120 pts/0    R+   13:35   0:00 /opt/perl/bin/perl584 code.pl
user      6621  114  2.2  96380 94800 pts/0    R+   13:35   0:02 /opt/perl/bin/perl584 code.pl

perl-5.8.5:
user      6624  1.0  0.0   3592  2124 pts/0    R+   13:35   0:00 /opt/perl/bin/perl585 code.pl
user      6624 82.6  2.2  96388 94812 pts/0    R+   13:35   0:02 /opt/perl/bin/perl585 code.pl

perl-5.8.6:
user      6627  0.0  0.0   3728  2144 pts/0    R+   13:35   0:00 /opt/perl/bin/perl586 code.pl
user      6627 81.3  2.2  96392 94832 pts/0    R+   13:35   0:02 /opt/perl/bin/perl586 code.pl

perl-5.8.7:
user      6630  0.0  0.0   3588  2040 pts/0    R+   13:35   0:00 /opt/perl/bin/perl587 code.pl
user      6630  110  2.2  93084 91552 pts/0    R+   13:35   0:02 /opt/perl/bin/perl587 code.pl

perl-5.8.8:
user      6633  0.0  0.0   3576  2044 pts/0    R+   13:36   0:00 /opt/perl/bin/perl588 code.pl
user      6633 78.6  0.0   3708  2116 pts/0    R+   13:36   0:02 /opt/perl/bin/perl588 code.pl





perl-5.9.0:
user      6646  0.0  0.0   3756  2256 pts/0    R+   13:38   0:00 /opt/perl/bin/perl590 code.pl
user      6646  101  2.2  96552 94936 pts/0    R+   13:38   0:02 /opt/perl/bin/perl590 code.pl

perl-5.9.1:
user      6649  0.0  0.0   3596  2096 pts/0    R+   13:38   0:00 /opt/perl/bin/perl591 code.pl
user      6649  101  2.2  96260 94780 pts/0    R+   13:38   0:02 /opt/perl/bin/perl591 code.pl

perl-5.9.2:
user      6652  0.0  0.0   3496  1972 pts/0    R+   13:38   0:00 /opt/perl/bin/perl592 code.pl
user      6652 98.5  0.0   3628  2036 pts/0    R+   13:38   0:01 /opt/perl/bin/perl592 code.pl

versions of List::Util:

perl-5.8.7: 1.14
perl-5.8.8: 1.18
perl-5.9.1: 1.13
perl-5.9.2: 1.14

Based on that I would say the bug/fix is/was in perl core and not in List::Util


In reply to Re: Help Diagnosing Memory Leak by Animator
in thread Help Diagnosing Memory Leak by Limbic~Region

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.