This documentation is archived and is not being maintained.

Process.MinWorkingSet Property

Gets or sets the minimum allowable working set size for the associated process.

[Visual Basic]
Public Property MinWorkingSet As IntPtr
public IntPtr MinWorkingSet {get; set;}
public: __property IntPtr get_MinWorkingSet();
public: __property void set_MinWorkingSet(IntPtr);
public function get MinWorkingSet() : IntPtr;
public function set MinWorkingSet(IntPtr);

Property Value

The minimum working set size that is required in memory for the process, in bytes.


Exception Type Condition
Win32Exception Working set information cannot be retrieved from the associated process resource.


The process identifier or process handle is zero because the process has not been started.

SystemException You are attempting to access the MaxWorkingSet property for a process that is running on a remote computer. The property is available only for processes running on the local computer.


The process Id is not available.


The process has exited.

PlatformNotSupportedException You are accessing this member using Windows 98.


The working set of a process is the set of memory pages currently visible to the process in physical RAM memory. These pages are resident and available for an application to use without triggering a page fault.

The working set includes both shared and private data. The shared data includes the pages that contain all the instructions that your application executes, including the pages in your .dll files and the system .dll files. As the working set size increases, memory demand increases.

A process has minimum and maximum working set sizes. Each time a process resource is created, the system reserves an amount of memory equal to the minimum working set size for the process. The virtual memory manager attempts to keep at least the minimum amount of memory resident when the process is active, but it never keeps more than the maximum size.

The system sets the default working set sizes. You can modify these sizes using the MaxWorkingSet and MinWorkingSet members. However, setting these values does not guarantee that the memory will be reserved or resident.

Note   When you increase the working set size of a process, you take physical memory away from the rest of the system. Ensure that you do not request a minimum or maximum working set size that is too large, because doing so can degrade system performance.


Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

Process Class | Process Members | System.Diagnostics Namespace | MaxWorkingSet | WorkingSet | PeakWorkingSet