I am working on a C # application that runs all the time in the system tray. Therefore, I would like to minimize the amount of memory that the application uses in standby mode. Using Windows perfmon and the Windows Task Manager, I have some numbers to use in standby mode.
- TaskManager Windows XP - Using Mem - 96 300K
- Perfmon
- .NET CLR memory
- # Bytes in all heaps - 34 513 708
- # Total bytes completed - 40 591 360
- # Total reserved bytes - 50 319 360
I think these numbers mean that my application has been allocated 96 MB of Windows memory. 50 MB of this is allocated for the CLR. CLR issued 40 mb of this.
Is there a way to determine if another 46 MB of memory is being used that was not assigned to the CLR? I assume that this will be a combination of memory used to load the DLL into the process and the memory used by this native code.
EDIT: I have a VMMap download and found the following.
- Private
- Total - 72mb
- Managed Heap - 25mb
- Stack - 16mb (seems pretty big)
- Private data - 13mb (I do not know what it is)
- The image is 8mb (most often a DLL).
- Page table - 6 mb (seems pretty big)
- Heap - 3mb
Can anyone suggest an interpretation of tables, private data, and page tables?
NOTE. The counters I originally quoted now show some weird numbers.
- TaskManager Windows XP - Using Mem - 43,628K
- Perfmon
- .NET CLR memory
- # Bytes in all Heaps - 20mb
- # Total bytes completed - 23mb
- # Total reserved bytes - 50mb
This suggests that the CLR reserved more memory than was allocated for the process. Obviously, this cannot be true, therefore the TaskManager should show only what was at the moment.
source share