Click or drag to resize
Xcalibur Systems LLC Logo

ProcessHelperSetProcessWorkingSetSize Method

Sets the minimum and maximum working set sizes for the specified process.

SetProcessWorkingSetSize function


Namespace: Xcalibur.NativeMethods.V2.Processes
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("kernel32.dll")]
public static bool SetProcessWorkingSetSize(
	IntPtr processHandle,
	UIntPtr minimumWorkingSetSize,
	UIntPtr maximumWorkingSetSize
)

Parameters

processHandle  IntPtr
A handle to the process whose working set sizes is to be set.
minimumWorkingSetSize  UIntPtr
The minimum working set size for the process, in bytes. The virtual memory manager attempts to keep at least this much memory resident in the process whenever the process is active. This parameter must be greater than zero but less than or equal to the maximum working set size.The default size is 50 pages (for example, this is 204,800 bytes on systems with a 4K page size). If the value is greater than zero but less than 20 pages, the minimum value is set to 20 pages.
maximumWorkingSetSize  UIntPtr
The maximum working set size for the process, in bytes. The virtual memory manager attempts to keep no more than this much memory resident in the rocess whenever the process is active and available memory is low. This parameter must be greater than or equal to 13 pages(for example, 53,248 on systems with a 4K page size), and less than the system-wide maximum(number of available pages minus 512 pages). The default size is 345 pages(for example, this is 1,413,120 bytes on systems with a 4K page size).

Return Value

Boolean
If the function fails, the return value is zero. To get extended error information, call .
See Also