GetProcessWorkingSetSizeEx function (memoryapi.h)
Retrieves the minimum and maximum working set sizes of the specified process.
Syntax
BOOL GetProcessWorkingSetSizeEx(
[in] HANDLE hProcess,
[out] PSIZE_T lpMinimumWorkingSetSize,
[out] PSIZE_T lpMaximumWorkingSetSize,
[out] PDWORD Flags
);
Parameters
[in] hProcess
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.
[out] lpMinimumWorkingSetSize
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.
[out] lpMaximumWorkingSetSize
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.
[out] Flags
The flags that control the enforcement of the minimum and maximum working set sizes.
Return value
None
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2003 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | memoryapi.h (include Windows.h on Windows Vista, Windows 7, Windows Server 2008 Windows Server 2008 R2) |
Library | onecore.lib |
DLL | Kernel32.dll |