in reply to Re: Hashing Memory Usage
in thread Hashing Memory Usage
Ah a red herring - it's not hashes at all! I'm changing values in a large hash as I loop through files. The problem occurs when I come to create the key for the hash. The following code works properly on 5.6 but grows on 5.8. Delete the substitution line, and hey presto, no more leak.
Now I'm confused!use strict; my $ret = `ps v $$`; print "$ret\n"; for ( 1 .. 1000 ){ my $key = ':PERSON-NUM(1:*):NI-NUM(1:*):'; for my $bb ( "PERSON-NUM", "NI-NUM" ){ if ( $key =~ /:$bb *\( *([0-9]+) *: *([0-9\*]+) *\) *:/ ){ $key =~ s/:$bb *\( *[0-9]+ *: *[0-9\*]+ *\) *:/:$bb=1:/; } } } $ret = `ps v $$`; print "$ret\n";
'I think the problem lies in the fact that your data doesn't fit my program'.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Hashing Memory Usage
by BrowserUk (Patriarch) on Jul 17, 2006 at 14:37 UTC |
In Section
Seekers of Perl Wisdom