January 7th, 2009
Measuring memory usage of object creation in C# - 1
As your application grows it can be useful to get an idea of how much memory a particular data structure is using in memory. Measuring memory in a garbage collected environment is a somewhat of a moving target as the Garbage collector is able to move things around in the background.The .NET libraries offer two ways of measuring your applications memory. The total amount of memory allocated to the process (which includes code, unique libraries) and the amount of memory used that the Garbage collector is aware off (which is only your applications variables). This second set is of course a subset of the total amount of memory.



Except where otherwise noted, content on this site is