On Mon Feb 09 04:35:54 2009, p5p@perl.wizbit.be wrote: > > Here is a test case that reproduces a memory leak. Repro instructions are > > within the introductory comment. > > > Two things affect the memory leak: > - use feature > - /ee: if /e is used there is no leak Did a binary search: ----Program---- #!/usr/bin/perl -l use strict; use warnings; use feature qw(:5.10); my $out1 = qx(ps uh $$); my ($mem1) = $out1 =~ m/^\S+\s+\d+\s+[\d.]+\s+[\d.]+\s+(\d+)\s+/; for (0 .. 100_000) { my $s = "a"; $s =~ s/a/qq("aa")/ee; } my $out2 = qx(ps uh $$); my ($mem2) = $out2 =~ m/^\S+\s+\d+\s+[\d.]+\s+[\d.]+\s+(\d+)\s+/; if ($mem2 > $mem1 + 2048) { print "not ok"; } else { print "ok"; } ----Output of .../pjYRGC9/perl-5.9.3@27665/bin/perl---- ok ----EOF ($?='0')---- ----Output of .../pNCKy6I/perl-5.9.3@27666/bin/perl---- not ok ----EOF ($?='0')---- http://public.activestate.com/cgi-bin/perlbrowse/p/27666 Change 27666 by nicholas@nicholas-saigo on 2006/04/01 21:17:46 Automatically set HINT_LOCALIZE_HH whenever %^H is modified. Kind regards, Bram