go ahead... be a heretic | |
PerlMonks |
Busted: Strange memory leak question. Please help!by catsophie (Initiate) |
on Sep 22, 2007 at 05:19 UTC ( [id://640482]=note: print w/replies, xml ) | Need Help?? |
Thank all for quick helps. Bellow is my report on the question. talexb, I suspect my Perl program consumed my memory by using 'free -m' to look at the free memory. When I ran the Perl program, free memory decreased very fast and did not release after the Perl program stopped. Fletch, you got the point. I forgot to delete the tree. Since I called HTML::TreeBuilder many times, that caused a serious memory wastage. After I deleted the tree, the memory leaking was almost solved. When I say 'almost', I mean there is still very slow memory leaking, like 1M bytes several minutes. graff is right, the trouble comes from my large script (1305 lines :P). I should break the script into smaller components. I didn't try Devel::Cycle and Test::Memory::Cycle, since I did not have complex reference structures.
In Section
Seekers of Perl Wisdom
|
|