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

Re: [perl #40416] threads creation memory leak

Thread Previous
From:
Dave Mitchell
Date:
September 27, 2006 02:44
Subject:
Re: [perl #40416] threads creation memory leak
Message ID:
20060927094654.GE15367@iabyn.com
On Wed, Sep 27, 2006 at 09:16:18AM +0300, Santeri Paavolainen wrote:
> I just realized that using multiple threads is what causes noise in the
> memory usage signal, and as the leak is straightforward doing a join
> instead of detach will keep the signal clean and produce
> easier-to-verify test:
> 
>     use threads;
> 
>     while (1) {
>       threads->create(\&away)->join;
>     }
> 
>     sub away {
>     }
> 
> With this test it is easy to see memory increase in just a few minutes
> running time (instead of tens of minutes with the detach version).

This doesn't leak with bleedperl, so I guess it's been fixed: sometime
between 5.9.3 and 5.9.4

-- 
In defeat, indomitable; in victory, insufferable
    -- Churchill on Montgomery

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