On 2007-03-25, at 23:01:27 +0100, Nicholas Clark wrote: > On Sat, Mar 24, 2007 at 06:55:11PM +0100, Marcus Holland-Moritz wrote: > > 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(). > > Having looked at pregfree, I agree. So, thanks applied as change 30753. > > and for t/op/pat.t we go from > 534.15 real 515.51 user 0.11 sys > to > 15.05 real 14.14 user 0.16 sys > > > However, I can now see some more things that could be done to the code and > structs... Yes, I can imagine what you're talking about... :-) But my patch wasn't meant to solve _all_ problems! ;-) Marcus -- You're using a keyboard! How quaint!Thread Previous | Thread Next