Finding Memory Used?

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

I'm trying to find out the amount of memory used by a data
structure (Hashtable) in a program.
If I look at the values for "Mem Usage" and "VM Size"
under the processes tab in the Windows Task manager, the
size increase seems to alot greater than if I just add up
the key and the element (i.e. Key and Value are Integers =
4 bytes*2 = 8 bytes per rec, * 1,000,000 ~ 8MB).
 
Sean,

You will need to get some sort of profiler to do this. Just looking at
the memory consumed by the process doesn't work because of the fact that the
CLR is a memory-managed system. The CLR will allocate more memory for the
process as time goes on.

Hope this helps.
 
Back
Top