2

我一直在关注本教程以供参考:http: //valgrind.org/docs/manual/ms-manual.html

当我使用它来分析我的应用程序时,使用命令: valgrind --tool=massif --time-unit=B ./run.o 它完成但不产生任何输出文件。这是使用上述命令运行时的日志。

https://www.dropbox.com/s/yae78rm9wmdbph1/ValGring_massif_Log?dl=0

请提出为什么它不会产生 massif.out.xxxxx 文件?

4

1 回答 1

2

如果你查看你的日志文件,你会看到 Valgrind 已经崩溃,它解释了为什么,以及你应该做些什么来修复它。

valgrind: m_mallocfree.c:304 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed.
valgrind: Heap block lo/hi size mismatch: lo = 91849568, hi = 1425748016.
This is probably caused by your program erroneously writing past the
end of a heap block and corrupting heap metadata.  If you fix any
invalid writes reported by Memcheck, this assertion failure will
probably go away.  Please try that before reporting this as a bug.

使用 Valgrindmemcheck修复您的程序并重试。

于 2015-06-15T07:50:20.397 回答