win32process.SetProcessWorkingSetSize

SetProcessWorkingSetSize(hProcess, MinimumWorkingSetSize, MaximumWorkingSetSize)

Sets minimum and maximum working set sizes for a process

Parameters

hProcess : PyHANDLE

Process handle as returned by OpenProcess

MinimumWorkingSetSize : int

Minimum number of bytes to keep in physical memory

MaximumWorkingSetSize : int

Maximum number of bytes to keep in physical memory

Comments

Set both min and max to -1 to have process swapped out completely