Why is there a huge difference between the GC.GetTotalMemory () and CLR Profiler numbers?

I have an object that I need to cache several of it for a web application in IIS, so I analyze how much memory each instance uses.

I wrote a small one exe, and I call it GC.GetTotalMemory(true)before and after the build, and the difference is about 335k, but if you analyze it in CLR profiler, it shows that 22 MB is used . for an object that does not make sense.

What am I misinterpreting in the CLR profiler?
Where should I check the profiler to see the sizes of individual objects?

+5
source share
1

MSDN: , .

CLR ;

, GC.GetTotalMemory(false), ?

+1

All Articles