2

Can anyone explain to me the difference between managed heap and GC heap? Since I noticed that sometimes the total managed heap size < (Gen 0 + Gen 1 + Gen 2 + LOH) in Process explorer + VMMap.

In my mind the total managed heap should be equal GC heap(Gen0-2+LOH),why in the .NET Performance tab of Process explorer, the total GC heap size is larger than the managed heap size in VMMap?

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
Denny
  • 129
  • 7
  • I'd guess the difference is memory that's not actually in use at the moment, but hasn't been given back to the OS. – CodesInChaos Apr 24 '13 at 09:23
  • I agree with you, but I'm still confused that if there are some unreferenced objects in GC heap, what is that in VMMap? I guess it will be as private data or native heap, it that true? – Denny Apr 24 '13 at 09:38

1 Answers1

4
GC HEAP

GC Heap hosts object instances and Generations are the logical view of the garbage collector heap

MANAGED HEAP

A managed heap segment is a chunk of memory that the garbage collector reserves from the OS (via calling VirtualAlloc) on behalf of managed code

LOADER HEAP

LoaderHeaps hold together the type system it is further divided in 1> High frequency heap 2> low frequency heap 3> Stub Heap

you can also use SOS to verify these heap

!eeheap -loader

!eeheap - GC

!GCRoot [-nostacks] [object reference]

slash shogdhe
  • 3,943
  • 6
  • 27
  • 46