New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory leak in array delete #7428
Comments
From perl-5.8.0@ton.iguana.beCreated by perl-5.8.0@ton.iguana.beThis leaks about 20 megabytes per second for me: #!/usr/bin/perl -w Perl Info
|
From @TuxOn 18 Jul 2004 22:16:25 -0000, Perl-5 . 8 . 0 @ Ton . Iguana . Be
even if you add two our's for $z and @array, it blows up pretty fast (but I didn't try with lexicals -- |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Sun, Jul 18, 2004 at 10:16:25PM -0000, perl-5. 8. 0 @ ton. iguana. be wrote:
it doesn't leak if you replace $array[0] with $hash{foo}. This boils down to the fact that hv_delete_ent() mortalizes the returned Dave. -- |
From @iabynOn Thu, Jul 22, 2004 at 09:52:48PM +0100, Dave Mitchell wrote:
Now fixed by the change below. Dave. -- Change 23158 by davem@davem-percy on 2004/07/23 11:06:02 [perl #30733] memory leak in array delete Affected files ... ... //depot/perl/av.c#78 edit Differences ... ==== //depot/perl/av.c#78 (text) ==== @@ -864,6 +864,8 @@ ==== //depot/perl/t/op/delete.t#10 (xtext) ==== @@ -1,6 +1,6 @@ -print "1..37\n"; # delete() on hash elements @@ -129,3 +129,16 @@ |
@rspier - Status changed from 'open' to 'resolved' |
From @gsarOn Fri, 23 Jul 2004 12:27:31 BST, Dave Mitchell wrote:
I'd suggest mortalizing only if it is AvREAL(av). FWIW, the previous behavior was probably a result of trying to be Thanks, Sarathy |
From @iabynOn Fri, Jul 23, 2004 at 09:22:45AM -0700, Gurusamy Sarathy wrote:
Good point.
Ah. I've just noticed that pp_pop() does the mortalizing rather than Neither the docs for hv_delete() nor av_delete() make any statement -- |
From @gsarOn Fri, 23 Jul 2004 19:50:26 BST, Dave Mitchell wrote:
Tough call. Might be a good idea if retaining backward compatibility is It comes down to a choice between internal consistency of the Sarathy |
From @iabynOn Fri, Jul 23, 2004 at 12:21:47PM -0700, Gurusamy Sarathy wrote:
One the other hand I just had a go at moving it from av_delete to And pp_delete() calls av_delete() twice, so this needs to be done in two So all other things being equal, I want to leave the mortalizing in dave. -- |
Migrated from rt.perl.org#30733 (status was 'resolved')
Searchable as RT30733$
The text was updated successfully, but these errors were encountered: