Export (0) Print
Expand All
Expand Minimize

GetProcessWorkingSetSizeEx function

Retrieves the minimum and maximum working set sizes of the specified process.

Syntax


BOOL WINAPI GetProcessWorkingSetSizeEx(
  _In_   HANDLE hProcess,
  _Out_  PSIZE_T lpMinimumWorkingSetSize,
  _Out_  PSIZE_T lpMaximumWorkingSetSize,
  _Out_  PDWORD Flags
);

Parameters

hProcess [in]

A handle to the process whose working set sizes will be obtained. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights.

Windows Server 2003:  The handle must have the PROCESS_QUERY_INFORMATION access right.

lpMinimumWorkingSetSize [out]

A 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.

lpMaximumWorkingSetSize [out]

A 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.

Flags [out]

The flags that control the enforcement of the minimum and maximum working set sizes.

ValueMeaning
QUOTA_LIMITS_HARDWS_MIN_DISABLE
0x00000002

The working set may fall below the minimum working set limit if memory demands are high.

QUOTA_LIMITS_HARDWS_MIN_ENABLE
0x00000001

The working set will not fall below the minimum working set limit.

QUOTA_LIMITS_HARDWS_MAX_DISABLE
0x00000008

The working set may exceed the maximum working set limit if there is abundant memory.

QUOTA_LIMITS_HARDWS_MAX_ENABLE
0x00000004

The working set will not exceed the maximum working set limit.

 

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.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinBase.h on Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (include Windows.h);
Memoryapi.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Process Working Set
Processes
SetProcessWorkingSetSizeEx

 

 

Community Additions

ADD
Show:
© 2014 Microsoft