Platform SDK: Performance Monitoring

EmptyWorkingSet

The EmptyWorkingSet function removes as many pages as possible from the working set of the specified process.

BOOL EmptyWorkingSet(
  HANDLE hProcess  // handle to process
);

Parameters

hProcess
[in] Handle to the process.

Return Value

If the function succeeds, the return value is nonzero.

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

Remarks

You can also use the SetProcessWorkingSetSize function to do what EmptyWorkingSet does if you pass it -1 for the minimum and maximum sizes.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Header: Declared in Psapi.h.
  Library: Use Psapi.lib.

See Also

Process Status Helper Overview, PSAPI Functions, EnumProcesses, SetProcessWorkingSetSize