Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
PSAPI Reference
PSAPI Functions
 EmptyWorkingSet Function
EmptyWorkingSet Function

Removes as many pages as possible from the working set of the specified process.

Syntax

BOOL WINAPI EmptyWorkingSet(
  __in  HANDLE hProcess
);

Parameters

hProcess [in]

A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION and PROCESS_SET_INFORMATION access rights. For more information, see Process Security and Access Rights.

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 empty the working set by calling the SetProcessWorkingSetSize or SetProcessWorkingSetSizeEx function with the dwMinimumWorkingSetSize and dwMaximumWorkingSetSize parameters set to the value (SIZE_T)–1.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderPsapi.h
LibraryPsapi.lib
DLLPsapi.dll

See Also

EnumProcesses
PSAPI Functions
SetProcessWorkingSetSize
Working Set
Working Set Information


Send comments about this topic to Microsoft

Build date: 11/6/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker