Skip Menu |

This queue is for tickets about the Algorithm-Combinatorics CPAN distribution.

Report information
The Basics
Id: 65207
Status: resolved
Priority: 0/
Queue: Algorithm-Combinatorics

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.25
Fixed in: (no value)



Subject: memory leak in subsets iteration?
Thanks for this module. Perhaps I misunderstood the docs, but I expected to be able to use iterator function without ongoing memory growth. Using the below sample script, the memory on my system is exhausted in less a minute. Is there a memory leak in the software or am I doing something wrong or unexpected? #### $|++; use strict; use Algorithm::Combinatorics qw( subsets); my $balls = [ (1)x42, (2)x152, (4)x48, (8)x144, (16)x92, (24)x55, (32)x69 ]; my $iter = subsets($balls); my %score_distribution; my $times_so_far = 0; while (my $r = $iter->next) { print "loop so far: $times_so_far. Num in subset".scalar @$r." \n" if (($times_so_far++ % 1000) == 0); }
Should not do that, I'll have a look into it, thanks.
Just uploaded version 0.26 to PAUSE which fixes this leak. Thanks for the ticket!
On Fri Jan 28 16:09:09 2011, FXN wrote: Show quoted text
> Just uploaded version 0.26 to PAUSE which fixes this leak. Thanks for > the ticket!
Great! Thank you. I see the ChangeLog entry says "thanks to Oliver Seeliger". That appears that it might be a mis-attribution, as you seem to be Xavier Noria, and I'm Mark Stosberg. Mark
On Fri Jan 28 16:15:26 2011, MARKSTOS wrote: Show quoted text
> On Fri Jan 28 16:09:09 2011, FXN wrote:
> > Just uploaded version 0.26 to PAUSE which fixes this leak. Thanks for > > the ticket!
> > Great! Thank you. > > I see the ChangeLog entry says "thanks to Oliver Seeliger". That appears > that it might be a mis-attribution, as you seem to be Xavier Noria, and > I'm Mark Stosberg.
Oh yes, Oliver provided the fix in the perl-xs mailing list, I added a reference to the ticket though.
Subject: Re: [rt.cpan.org #65207] memory leak in subsets iteration?
Date: Fri, 28 Jan 2011 16:26:44 -0500
To: bug-Algorithm-Combinatorics [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Show quoted text
>> I see the ChangeLog entry says "thanks to Oliver Seeliger". That appears >> that it might be a mis-attribution, as you seem to be Xavier Noria, and >> I'm Mark Stosberg.
> > Oh yes, Oliver provided the fix in the perl-xs mailing list, I added a reference to the ticket > though.
I see. I'm glad Oliver was able to provide the fix-- memory leaks can be very hard to track down sometimes. Mark