简体   繁体   中英

Memory leak in perl

Below is the output of one of my tests using Memory::Usage .

time vsz ( diff) rss ( diff) shared ( diff) code ( diff) data ( diff)
0 264620 ( 264620) 95848 ( 95848) 8460 ( 8460) 4 ( 4) 85440 ( 85440) before
3 294668 ( 30048) 115552 ( 19704) 13728 ( 5268) 4 ( 0) 99808 ( 14368) after

Does this mean my code have large memory leak,as diffs are very much high ???

Can somebody please tell better ways to test memory leaks

The diff column indicates the change in memory consumption, and when it grows too much, that's not a good sign.

Another way to test memory leaks is Test::LeakTrace .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM