develooper Front page | perl.perl5.porters | Postings from September 2014

Re: [perl #78362] keys()/each() leak memory with threads::shared

Thread Previous
From:
Dave Mitchell
Date:
September 23, 2014 10:02
Subject:
Re: [perl #78362] keys()/each() leak memory with threads::shared
Message ID:
20140923100124.GW5204@iabyn.com
On Mon, Sep 22, 2014 at 06:50:03PM -0700, James E Keenan via RT wrote:
> On Wed Oct 13 12:45:28 2010, jdhedden@cpan.org wrote:
> Reviewing this older ticket tonight, I built a threaded perl (see attachment for perl -V) at HEAD of blead, then ran the test script which Jerry provided a couple of years back.
> 
> This was the output:
> #####
> $ ./perl -Ilib ~/learn/perl/p5p/78362-leak.pl 
> Leak test 1 running...
> Leak test 2 running...
> Leak test 3 running...
> Done
> #####
> 
> The program completed in 0m0.779s. Should I have expected to see some error output?  Has the bug somehow been fixed?

Increase $MAX_LOOP so that each loop runs for longer, then execute while
top is running. This will show (on 5.12.x) that the first two tests use
constant virtual memory, while the third test sees quickly increasing VM.

However, it appears to have been fixed sometime between 5.16.0 and 5.18.0


-- 
Never do today what you can put off till tomorrow.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About