develooper Front page | perl.perl5.porters | Postings from March 2007

Re: The performance problem of 30678

Thread Previous | Thread Next
From:
Marcus Holland-Moritz
Date:
March 24, 2007 10:55
Subject:
Re: The performance problem of 30678
Message ID:
20070324185511.02f84668@r2d2
On 2007-03-24, at 15:06:23 +0000, Nicholas Clark wrote:

> So. I don't think that the problem was quite what we thought that it was :-)
> 
> Are we making lots more SVs? Or are we just bumping the refcounts through the
> roof?

I think the attached patch fixes this. The problem is
that the loop in Perl_reg_temp_copy() ups the refcount
of all three members of the substr struct. But the third
member is actually just pointing to one of the others.
So the code ups the refcount of one of these two twice,
which causes it not to be freed later in Perl_pregfree().

Marcus

-- 
Alone, adj.:
	In bad company.
		-- Ambrose Bierce, "The Devil's Dictionary"

Thread Previous | Thread Next


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