The EmptyWorkingSet function removes as many pages as possible from the working set of the specified process.
BOOL EmptyWorkingSet(
HANDLE hProcess // identifies the process
);
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.
You can also use the SetProcessWorkingSetSize function to do what EmptyWorkingSet does if you pass it 0xFFFFFFFF for the minimum and maximum sizes.
Process Status Helper Overview, PSAPI Functions, EnumProcesses, SetProcessWorkingSetSize