![Xcalibur Systems LLC Logo](../icons/logo.png) |
ProcessHelperSetProcessWorkingSetSize Method |
Namespace: Xcalibur.NativeMethods.V2.ProcessesAssembly: 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
)
<DllImportAttribute("kernel32.dll">]
Public Shared Function SetProcessWorkingSetSize (
processHandle As IntPtr,
minimumWorkingSetSize As UIntPtr,
maximumWorkingSetSize As UIntPtr
) As Boolean
public:
[DllImportAttribute(L"kernel32.dll")]
static bool SetProcessWorkingSetSize(
IntPtr processHandle,
UIntPtr minimumWorkingSetSize,
UIntPtr maximumWorkingSetSize
)
[<DllImportAttribute("kernel32.dll")>]
static member SetProcessWorkingSetSize :
processHandle : IntPtr *
minimumWorkingSetSize : UIntPtr *
maximumWorkingSetSize : UIntPtr -> bool
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
BooleanIf the function fails, the return value is zero. To get extended error
information, call .
See Also