win32process.SetProcessWorkingSetSize
SetProcessWorkingSetSize(hProcess, MinimumWorkingSetSize, MaximumWorkingSetSize)
Sets minimum and maximum working set sizes for a process
Parameters
hProcess : PyHANDLE
Process handle as returned by OpenProcessMinimumWorkingSetSize : int
Minimum number of bytes to keep in physical memoryMaximumWorkingSetSize : int
Maximum number of bytes to keep in physical memoryComments
Set both min and max to -1 to have process swapped out completely