[英]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.