[英]Memory leak in perl
Below is the output of one of my tests using Memory::Usage
.以下是我使用
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. diff 列表示内存消耗的变化,当它增长太多时,这不是一个好兆头。
Another way to test memory leaks is Test::LeakTrace .另一种测试内存泄漏的方法是Test::LeakTrace 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.