How can I analyze the unmanaged heap size of a .NET process with Windbg? Which commands should be used in WinDbg?
!address -summary
gives you an overview not focusing on individuals heaps.
Usage summary contains the following:
Type summary contains:
State summary:
Protect Summary should explain itself. If you're very new, it's probably not that interesting.
Largest Region by usage:
Especially important here is the free region. The largest free region determines how much memory you can get in one block. Look around for memory fragmentation to find out why this can be an issue.
!heap -s
gives you the summary about heaps with focus on individual heaps.
These are all native memory allocations done via the Windows heap manager. Direct allocations via VirtualAlloc() are not listed (e.g. MSXML and .NET).
Read more about native memory management on MSDN: Managing Heap Memory and MSDN: Managing Virtual Memory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With