Tao.Platform.Windows SDK Documentation

Kernel.GetProcessWorkingSetSize Method 

The GetProcessWorkingSetSize function retrieves the minimum and maximum working set sizes of the specified process.

[Visual Basic]
Public Shared Function GetProcessWorkingSetSize( _
   ByVal process As IntPtr, _
   ByRef minimumWorkingSetSize As Integer, _
   ByRef maximumWorkingSetSize As Integer _
) As Boolean
[C#]
public static bool GetProcessWorkingSetSize(
   IntPtr process,
   out int minimumWorkingSetSize,
   out int maximumWorkingSetSize
);

Parameters

process
Handle to the process whose working set sizes will be obtained. The handle must have the PROCESS_QUERY_INFORMATION access right.
minimumWorkingSetSize
Pointer to a variable that receives the minimum working set size of the specified process, in bytes. The virtual memory manager attempts to keep at least this much memory resident in the process whenever the process is active.
maximumWorkingSetSize
Pointer to a variable that receives the maximum working set size of the specified process, in bytes. The virtual memory manager attempts to keep no more than this much memory resident in the process whenever the process is active when memory is in short supply.

Return Value

If the function succeeds, the return value is true.

If the function fails, the return value is false. To get extended error information, call GetLastWin32Error.

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 minimum and maximum working set sizes affect the virtual memory paging behavior of a process.

See Also

Kernel Class | Tao.Platform.Windows Namespace | SetProcessWorkingSetSize