Hook API to detect memory leak
2012-11-29 15:12
316 查看
最近有个这样的需求,就是在不能获取dll源码情况下来检测该dll的内存泄漏。并且该dll是release下的版本,链接了release版的CRT。由于不能获取源码,就不能重新编译,比较好的解决方案就是hook api。寻思这事儿肯定有人干过,搜了一下在code project上真有。收藏一下:
http://www.codeproject.com/Articles/150463/LeakMon-Track-Handle-leak-GDI-Leak-and-Memory-Leak
http://www.codeproject.com/Articles/175591/LeakMon-Part-2-Under-the-hood
基本原理是hook api,打印call stack,然后用dbg helper根据pdb解析成能看的call stack。
http://www.codeproject.com/Articles/150463/LeakMon-Track-Handle-leak-GDI-Leak-and-Memory-Leak
http://www.codeproject.com/Articles/175591/LeakMon-Part-2-Under-the-hood
基本原理是hook api,打印call stack,然后用dbg helper根据pdb解析成能看的call stack。
相关文章推荐
- How to use windbg to detect memory leak
- Memo: How to use UMDH to detect memory leak
- Steps To Detect Memory Leak(Draft)
- How to detect memory leak issue
- How to debug native memory leak in anroid
- To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
- how to debug memory-leak
- This is very likely to create a memory leak.
- How to detect and avoid memory and resources leaks in .NET applications()
- C++ shared memory leak, how to clear shared memory?
- How to detect and avoid memory and resources leaks in .NET applications
- 遇到"To prevent a memory leak, the JDBC Driver has been forcibly unregistered." 后
- detect memory leak macro
- Threads are going to be renewed over time to try and avoid a probable memory leak.
- Use Java Memory Analyzer and VM args to detect memory leakage
- To prevent a memory leak, the JDBC Driver has been forcibly unregistered
- How to Find A Memory Leak
- Use UMDH to identify memory leak problem
- detect memory leak macro
- This is very likely to create a memory leak 异常