in reply to Memory consumption
Posting here was quite stimulating for thinking!!!
Solution is simple. Instead of printing dereferenced array from hash I first assign it to local variable which is printed.
# before print OUT3 join("\t", @{$hash{$data[0]}}) ."\n"; #now my @data1 = @{$hash{$data[0]}}; print OUT3 join("\t", @data1) ."\n";
I can only guess that before it was assigning some memory to anonymous array for dereferenced hash array and not releasing that memory for new cycle.
Any comments from perl memory management guru are very welcome!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Memory consumption
by chromatic (Archbishop) on May 07, 2009 at 00:02 UTC |