了解valgrind输出丢失记录
Understanding valgrind output loss record
当我 运行 在我的进程上使用 valgrind 并在进程退出后,我得到低于输出。 "loss record 33,118 of 34,156"
是什么意思
==4215== 128个块中的2,048个字节肯定丢失在丢失记录33,118 of 34,156
表示总共34156条记录中的第33118条丢失记录。
如 Valgrind 文档的 Memory leak detection 部分所述,
... it merges results for all blocks that have the same leak kind and sufficiently similar stack traces into a single "loss record".
... The loss records are not presented in any notable order, so the loss record numbers aren't particularly meaningful. The loss record numbers can be used in the Valgrind gdbserver to list the addresses of the leaked blocks and/or give more details about how a block is still reachable.
当我 运行 在我的进程上使用 valgrind 并在进程退出后,我得到低于输出。 "loss record 33,118 of 34,156"
==4215== 128个块中的2,048个字节肯定丢失在丢失记录33,118 of 34,156
表示总共34156条记录中的第33118条丢失记录。
如 Valgrind 文档的 Memory leak detection 部分所述,
... it merges results for all blocks that have the same leak kind and sufficiently similar stack traces into a single "loss record".
... The loss records are not presented in any notable order, so the loss record numbers aren't particularly meaningful. The loss record numbers can be used in the Valgrind gdbserver to list the addresses of the leaked blocks and/or give more details about how a block is still reachable.