Breyta

Deila með


Process.MinWorkingSet Property

Definition

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

public:
 property IntPtr MinWorkingSet { IntPtr get(); void set(IntPtr value); };
public IntPtr MinWorkingSet { get; [System.Runtime.Versioning.SupportedOSPlatform("windows")] set; }
public IntPtr MinWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] get; [System.Runtime.Versioning.SupportedOSPlatform("windows")] [System.Runtime.Versioning.SupportedOSPlatform("freebsd")] [System.Runtime.Versioning.SupportedOSPlatform("macos")] set; }
public IntPtr MinWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] [System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")] get; [System.Runtime.Versioning.SupportedOSPlatform("windows")] [System.Runtime.Versioning.SupportedOSPlatform("freebsd")] [System.Runtime.Versioning.SupportedOSPlatform("macos")] [System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")] set; }
public IntPtr MinWorkingSet { get; set; }
[<set: System.Runtime.Versioning.SupportedOSPlatform("windows")>]
member this.MinWorkingSet : nativeint with get, set
[<set: System.Runtime.Versioning.SupportedOSPlatform("windows")>]
[<get: System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<get: System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("freebsd")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("macos")>]
member this.MinWorkingSet : nativeint with get, set
[<set: System.Runtime.Versioning.SupportedOSPlatform("windows")>]
[<get: System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<get: System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("freebsd")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("macos")>]
[<get: System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
member this.MinWorkingSet : nativeint with get, set
member this.MinWorkingSet : nativeint with get, set
Public Property MinWorkingSet As IntPtr

Property Value

IntPtr

nativeint

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

Attributes

Exceptions

The minimum working set size is invalid. It must be less than or equal to the maximum working set size.

Working set information cannot be retrieved from the associated process resource.

-or-

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

You are trying to access the MinWorkingSet property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.

The process Id is not available.

-or-

The process has exited.

Remarks

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.

Applies to

See also