[英]Valgrind: Memory leak or no?
我在程序上运行valgrind,并得到以下输出(我将忽略上面的83个错误,让我知道是否应将它们包括在日志中):
==9723== LEAK SUMMARY:
==9723== definitely lost: 0 bytes in 0 blocks
==9723== indirectly lost: 0 bytes in 0 blocks
==9723== possibly lost: 4,676 bytes in 83 blocks
==9723== still reachable: 88,524 bytes in 579 blocks
==9723== suppressed: 0 bytes in 0 blocks
==9723== Reachable blocks (those to which a pointer was found) are not shown.
==9723== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==9723==
==9723== For counts of detected and suppressed errors, rerun with: -v
==9723== ERROR SUMMARY: 83 errors from 83 contexts (suppressed: 3 from 3)
无论我运行程序多长时间,无论是2秒还是2分钟,这都是我从valgrind获得的输出。
由于“可能丢失”不会随时间增加,因此可以安全地假设我没有内存泄漏吗?
这些错误似乎都来自libglib,并且围绕着g_malloc0和g_realloc。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.