1

I know that my application is leaking memory & I used WinDbg tool to profile. I attached W3WP process and ran following command:

!address –summary

It generated following result.

Result of !address -summary command on WinDbg

I want someone help me understand this result and guide me or provide me a link which in-turn will help me understand what needs to be done

SharpCoder
  • 18,279
  • 43
  • 153
  • 249

2 Answers2

2

The MSDN link explains what the different memory regions are, in terms of how to interpret this you need to record the output twice, before and after the leak to see what increases, we can guess by looking just at the largest used regions but you have one marked as <unknown>. You may need to sort the symbols out first and then run the !address command again.

Additionally you may find umdh or debugdiag may make leak finding easier for you, additionally there is an leak detection command in WinDbg !heap -l

As far as links are concerned there is a related post on useful resources

Community
  • 1
  • 1
EdChum
  • 376,765
  • 198
  • 813
  • 562
  • Thank you quick reply. I looked at the help for WinDbg, while it explains all other symbols (Image, Heap32.. etc), It does not talks about . I wonder this is becuase it is part of unmaged resource. I am looking for any resource which will give me step by step usage of any tool which will help me getting into the bottom of this issue. – SharpCoder Apr 04 '13 at 10:10
  • @Brown_Dynamite the `` are [virtual allocs](http://stackoverflow.com/questions/4885429/parse-the-crash-dump-in-windbg-for-private-bytes-other-than-managed-heap) apparently, you can dump these using `!address -f:VAR` this will output a shedload of stuff you can look at the stacks following this [link](http://social.msdn.microsoft.com/Forums/en-US/clr/thread/63bd564a-7278-475f-89e9-b1634a71569f) and [this tutorial](http://www.codeproject.com/Articles/31382/Memory-Leak-Detection-Using-Windbg) but you may want to try umdh, debugdiag or `!heap -l` as they automatically detect leaks – EdChum Apr 04 '13 at 10:34
  • @EdShum: Thank you for the help:-). I will try these steps. – SharpCoder Apr 04 '13 at 10:39
  • 2
    @Brown_Dynamite The .NET managed heap falls within the type. You could look at that with the SOS extension `.loadby sos.dll mscorwks` (for .NET 2) and `.loadby sos.dll clr` (for .NET 4). Then try `!dumpheap -stat` for a summary of the managed heap. – Marc Sherman Apr 04 '13 at 13:01
1

Unknown -> Memory used by .Net Objects

Free -> free area

Image ->Memory occupied by dlls.

Heap32 -> Memory occupied by native objects.(non .Net)

http://blogs.msdn.com/b/webtopics/archive/2010/04/02/address-summary-explained.aspx

Rockstart
  • 2,337
  • 5
  • 30
  • 59