native memory leak - how to find callstack of allocation source

泪湿孤枕 提交于 2019-12-03 17:19:04
Kjell Gunnar

If you don't get a call stack from !heap -p -a
The reason can be that you have not used gflags correctly
Remeber to use correct name including .exe
Try to start it inteactivly and go to the image tab, might be easier
Try with page heap, that also gives call stack

You should use deleaker. It's powerful tool for debuging.

use valgrind for linux and deleaker for windows.

I know nothing about Windows, but at least on Unix systems a debugger (like gdb on Linux) is useful to understand callstacks.

And you could also circumvent some of your issues by using e.g. Boehm's conservative garbage collector. On many systems you can also hunt memory leaks with the help of valgrind

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!