How to use windbg to detect memory leak

来源:互联网 发布:大唐软件 ptc 编辑:程序博客网 时间:2024/05/21 15:45

Detecting memory leaks with WinDBG the modern (and free) way

http://cfc.kizzx2.com/index.php/detecting-memory-leaks-with-windbg-the-modern-and-free-way/

 

detailed instruction: Memory Leak Detection Using Windbg

http://www.codeproject.com/KB/cpp/MemoryLeak.aspx

 

simple instruction: Heap Debugging (Memory/Resource Leak) with WinDbg

http://hacksoflife.blogspot.com/2009/06/heap-debugging-memoryresource-leak-with.html

 

 

gflags /i leak.exe +ust

windbg -g leak.exe

gflags /i leak.exe -ust

 

In Windbg, you can check statck with below way:

{80} normal block at 0x003B4378, 8000 bytes long. Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD

!heap -p -a 0x003B4378

 

原创粉丝点击