I'm running 5.16 I don't see leaks http://live.sysinternals.com/procexp.exe
#!/usr/bin/perl -- sub mm { print pslistMem($$),"\n"; } sub pslistMem { my( $pid ) = @_; my @lines = qx{pslist -m $pid 2>NUL}; chomp @lines; #~ Name Pid VM WS Priv Priv Pk Faults +NonP Page #~ perl 1052 25348 7220 4504 4512 1977 + 2 33 my %ps; @ps{'Name', 'Pid', 'VM', 'WS', 'Priv', 'Priv Pk', 'Faults', 'NonP', 'Page' } = grep length, split /\s+/, $lines[-1]; #~ Pri Priority #~ Thd Number of Threads #~ Hnd Number of Handles #~ VM Virtual Memory #~ WS Working Set ------ "Mem Usage" in taskmanager #~ Priv Private Virtual Memory ------ "VM Size" in taskman +ager #~ Priv Pk Private Virtual Memory Peak #~ Faults Page Faults #~ NonP Non-Paged Pool #~ Page Paged Pool #~ Cswtch Context Switches #~ use DDS; Dump(\@lines , \%ps); return "WVM: $ps{VM} { WS: $ps{WS} VM: $ps{Priv} } "; } for ( 1 .. 5 ) { mm; for ( 1 .. 1000 ) { system 'echo >NUL'; } mm; } mm; __END__ WVM: 21648 { WS: 4476 VM: 1832 } WVM: 21648 { WS: 4496 VM: 1844 } WVM: 21648 { WS: 4496 VM: 1844 } WVM: 21648 { WS: 4496 VM: 1844 } WVM: 21648 { WS: 4496 VM: 1844 } WVM: 21648 { WS: 4496 VM: 1844 } WVM: 21648 { WS: 4496 VM: 1844 } WVM: 21648 { WS: 4496 VM: 1844 } WVM: 21648 { WS: 4496 VM: 1844 } WVM: 21648 { WS: 4496 VM: 1844 } WVM: 21648 { WS: 4496 VM: 1844 }

In reply to Re: Memory Usage of Perl System command by Anonymous Monk
in thread Memory Usage of Perl System command by pperi2

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.