My script does the following
Then it waits for 10+ minutes after the last print statement and exits. The wait at the end doesn't happen every time. During the wait top
command shows the same 92% memory usage but no cpu usage. Why does it wait sometimes after it is done ? If I hit CtrlC, it exits immediately without any change in outcome(results). How do I debug this or is it expected behavior as the hash is huge ?
EDIT
Is it possible to reclaim some memory on the fly by deleting unwanted key - value pairs from the hash ?
I assume you know 'delete' function (so removed reference to perldoc -f delete :)
For the memory debugging you could use valgrind Also this hint can be helpful: Does Perl v5.10.1 have memory leaks or how to interpret valgrind It suggests using:
use Perl::Destruct::Level level => 1;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With