Differences on GC.GetTotalMemory() with the task manager

  • Thread starter Thread starter Muscha
  • Start date Start date
M

Muscha

Hello,

When I print out the result of GC. GetTotalMemory(true) it's so much
different from the one in task manager. Say for example GC.GetTotalMemory()
returns: 721668 (~7MB) while in task manager my process shows at a whopping
50MB!!! This is weird .. am I missing something here?


thanks,

victor
 
Hello,

The Task Memory shows all the memory allocated for your process, while the
GC.GetTotalMemory() method returns only amount of *managed* memory
allocated.
 
Back
Top