On Mon, Sep 29, 2003 at 08:16:22PM +0300, Enache Adrian wrote: > On Mon, Sep 29, 2003 a.d., Dave Mitchell wrote: > > On Sun, Sep 28, 2003 at 04:27:36PM -0000, Eric Garland wrote: > > > This program will make perl 5.8.1 expand to using 350 mb on my linux > > > machine within 60 seconds: > > > > > > > > > use threads; > > > use threads::shared; > > > my @shared : shared; > > > @shared = (1) while (1); > > > > It's leaking 1 shared-interpreter SV per iteration. Not sure what the SV > > is yet. May not have time to investigate further. > > Look at ext/threads/shared/shared.xs - sharedsv_elem_mg_STORE(). > The svp got with 'av_fetch(..,1)' has its refcnt incremented from 1 to 2 > by Perl_sharedsv_associate(). When the array is cleared, it won't be > freed. Turned out to be slightly different. The AV in the shared interpreter wasn't geting its AvREAL flag set, so when cleared, it wasn't REFCNTdec-ing its elements. Fixed in bleedperl by change #21527. Dave. -- Please note that ash-trays are provided for the use of smokers, whereas the floor is provided for the use of all patrons. - Bill RoystonThread Previous | Thread Next