我之前发过一篇帖子,询问如何检查内存泄漏等问题。我确实说过我对Linux终端不太熟悉,但有人告诉我使用Valgrind很容易。
我已经成功运行了它,但我不确定输出结果的意思。粗略地看,一切看起来都很好,但如果可能的话,我想请经验丰富的人确认一下。输出如下:
^C==2420==
==2420== HEAP SUMMARY:
==2420== in use at exit: 2,240 bytes in 81 blocks
==2420== total heap usage: 82 allocs, 1 frees, 2,592 bytes allocated
==2420==
==2420== LEAK SUMMARY:
==2420== definitely lost: 0 bytes in 0 blocks
==2420== indirectly lost: 0 bytes in 0 blocks
==2420== possibly lost: 0 bytes in 0 blocks
==2420== still reachable: 2,240 bytes in 81 blocks
==2420== suppressed: 0 bytes in 0 blocks
==2420== Reachable blocks (those to which a pointer was found) are not shown.
==2420== To see them, rerun with: --leak-check=full --show-reachable=yes
==2420==
==2420== For counts of detected and suppressed errors, rerun with: -v
==2420== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 13 from 8)
这里一切都好吗?唯一让我担心的是“仍可访问”部分。那还可以吗?