Detecting .NET clr heap leaks with WinDbg

WinDbg can be used to debug .NET application by loading first the SOS.dll module.

Open WinDbg and attach to a .NET process.
Run:
.loadby SOS.dll

Now we can examine the heap by running
!dumpheap -stat

or 
!dumpheap -stat -min 1000 to show only objects with a total size of more than 1000 bytes.


Post a Comment

Previous Post Next Post