Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is WinDbg <unknown> Memory?

I'm debugging a Winforms application for a memory leak. In the dump file provided by the customer there is a large discrepancy between the unknown memory usage and the .NET Heap size. (Approximately 1000mb vs 200mb). So what is in the unknown segment other than the VirtualAllocs done by the CLR?

!eeheap -gc output

enter image description here

!address -summary output

enter image description here

like image 799
gawicks Avatar asked Sep 10 '16 12:09

gawicks


1 Answers

Memory that is reported as <unknown> by WinDbg is memory that was allocated via VirtualAlloc(). Some commonly known sources are:

  • .NET (because it has its own heap manager)
  • direct VirtualAlloc() calls in your code
  • C++ HeapAlloc() calls that are larger than some limit (512k if I recall correctly)
  • MSXML
  • Bitmaps (according to @Hans Passant's comment)
like image 105
Thomas Weller Avatar answered Oct 14 '22 01:10

Thomas Weller