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

Re: The performance problem of 30678

Thread Previous | Thread Next
Marcus Holland-Moritz
March 24, 2007 10:55
Re: The performance problem of 30678
Message ID:
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().


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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About