Forms application memory usage in Taskmanager

  • Thread starter Thread starter mlc
  • Start date Start date
M

mlc

Can someone explain to me the memory usage patterns I see when observing an
Forms application in Taskmanager?

what I see:
Start the program and the TaskManager says it is 11 MBs or so.
Minimize the program and the task manager says it is about 300KB or so.
Maximize the program and the task manager says it is about 3.5MB give or
take a few.

So why the great differences in size?
 
* "mlc said:
Can someone explain to me the memory usage patterns I see when observing an
Forms application in Taskmanager?

what I see:
Start the program and the TaskManager says it is 11 MBs or so.
Minimize the program and the task manager says it is about 300KB or so.
Maximize the program and the task manager says it is about 3.5MB give or
take a few.

So why the great differences in size?

This behavior is not specific to .NET applications only.

It is a feature of the Windows/Explorer shell.

If an application is minimized, Windows removes the working set memory from
the application by calling the Win32 function 'SetProcessWorkingSetSize':

<http://msdn.microsoft.com/library/en-us/dllproc/base/setprocessworkingsetsize.asp>

Windows supposes that minimized applications will not be used for some time
and this memory will be made available to other processes.

When restoring the window the application gets the memory back:

<http://support.microsoft.com/?kbid=293215>

This behavior is by design and it doesn't make sense to worry about
 
Back
Top