我正在运行一个与 tcmalloc 链接的二进制文件,它没有为它正在检测的泄漏生成堆栈跟踪。
The output says:
The 1 largest leaks:
Leak of 1401231 bytes in 82093 objects allocated from:
If the preceding stack traces are not enough to find the leaks, try running THIS shell command:
pprof ../../prog "/tmp/prog.15062.prog-end.heap" --inuse_objects --lines --heapcheck --edgefraction=1e-10 --nodefraction=1e-10 --gv
当我运行 pprof 时,我收到一条消息,指出没有要打印的节点。
我附上了可疑内存泄漏的代码
HeapLeakChecker checker("prog");
....
assert(checker.NoLeaks());
关于如何调试的任何想法?