Skip Menu |
 

This queue is for tickets about the List-MoreUtils CPAN distribution.

Report information
The Basics
Id: 41097
Status: resolved
Priority: 0/
Queue: List-MoreUtils

People
Owner: Nobody in particular
Requestors: rossiya2 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 0.400_003



Subject: Big memory leak with XS part()
Date: Thu, 20 Nov 2008 06:28:41 -0800
To: bug-List-MoreUtils [...] rt.cpan.org
From: "m c" <rossiya2 [...] gmail.com>
Download (untitled) / with headers
text/plain 1.1k
Running sample program below causes a big memory leak, while toggling to pure perl smart() does not. Apparently this trouble is narrowed down to the XS version of part(). use List::MoreUtils qw(part); sub smart(&@) { my ($code, @list) = @_; my @parts; push @{ $parts[$code->($_)] }, $_ for @list; return @parts; } while (1) { my $i = 0; # my @part = smart { $i++ % 2 } 1 .. 8; # returns [1, 3, 5, 7], [2, 4, 6, 8] my @part = part { $i++ % 2 } 1 .. 8; # returns [1, 3, 5, 7], [2, 4, 6, 8] } BOX SPECS: $VERSION = '0.22'; $ uname -a FreeBSD pocket.mydomain.net 7.0-RELEASE FreeBSD 7.0-RELEASE #1: Wed Mar 5 22:46:53 PST 2008 kochevnik@:/usr/obj/usr/src/sys/CUSTOM2 i386 $ perl -v This is perl, v5.8.8 built for i386-freebsd-thread-multi-64int (with 1 registered patch, see perl -V for more detail) MEMORY USAGE 5 MINUTES RUNNING smart() PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 45863 kochevnik 1 115 0 5416K 3408K RUN 0 3:13 92.58% perl MEMORY USAGE 5 MINUTES RUNNING XS part() PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 49209 kochevnik 1 114 0 563M 561M RUN 0 2:34 86.67% perl
This is resolved in 0.23 which I just uploaded to the CPAN.
Download (untitled) / with headers
text/plain 265b
On Sun Jul 12 14:46:36 2009, VPARSEVAL wrote: Show quoted text
> This is resolved in 0.23 which I just uploaded to the CPAN.
Note that the 0.23 code line is no longer in the latest release, 0.26. Consequently this and a number of other tickets in this queue are no longer resolved.
Subject: Re: [rt.cpan.org #41097] Big memory leak with XS part()
Date: Tue, 30 Nov 2010 17:48:18 +1100
To: bug-List-MoreUtils [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
Download (untitled) / with headers
text/plain 558b
My line was based on 0.23... I thought. I'll have this fixed in a few hours. Adam K On 30 November 2010 05:21, Karen Etheridge via RT <bug-List-MoreUtils@rt.cpan.org> wrote: Show quoted text
>       Queue: List-MoreUtils >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=41097 > > > On Sun Jul 12 14:46:36 2009, VPARSEVAL wrote:
>> This is resolved in 0.23 which I just uploaded to the CPAN.
> > Note that the 0.23 code line is no longer in the latest release, 0.26. > Consequently this and a number of other tickets in this queue are no > longer resolved. >
I've disable part() in 0.27_04 until smarter people can fix the leaking
That seems to be resolved in recent releases


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.