Subject: | leaks in pairwise (XS only, pure perl OK) |
Date: | Fri, 14 May 2010 17:45:48 -0500 |
To: | bug-List-MoreUtils [...] rt.cpan.org |
From: | Benjamin Heintz <benjamin.heintz [...] gmail.com> |
Hello,
The XS implementation of List::MoreUtils::pairwise appears to leak memory,
while the pure perl implementation seems OK.
Module info:
List::MoreUtils v0.22
Perl version info:
This is perl, v5.10.1 built for MSWin32-x86-multi-thread
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2009, Larry Wall
Binary build 1006 [291086] provided by ActiveState
http://www.ActiveState.com
Built Aug 24 2009 13:48:26
OS info:
MINGW32_NT-5.2 TWS-20 1.0.12(0.46/3/2) 2010-02-05 01:08 i686 unknown
Problem:
Memory usage for this script increases with time when
%ENV{LIST_MOREUTILS_PP} is 0, remains constant when that value is 1.
#! perl
use List::MoreUtils qw( pairwise );
my @left = (1..100);
my @right = (101..200);
pairwise { $a, $b } @left, @right while 1;
__END__
Please let me know if you need any more information. Thank you!
-Ben