Is it possible to hint Windows to bring a process completely out of swap

Is it possible to hint the Windows virtual-memory-manager to bring a particular process out of swap?

The situation I often find myself in is normally using about 50% of my RAM for all the normal programs, one in particular being an IDE for an embedded target, along with its associated debugger.

Then I leave a memory hungry process running - eg wireshark or something that's accumulating data over a weekend, everything gets swapped out - as they should. After the big process is finished, most processes are left in swap.

Then the sporadic pauses to swap the process back in cause problems with the debugger, presumably due to timing issues in the comms between IDE and the hardware-debugger. So control of the target device can be sporadic until enough attempts have brought the debug-data in the IDE back out of swap.


KerrekSB developed a special tool for this purpose:

https://stackoverflow.com/a/2940209/684229

It is available on GiTHUB with binaries: https://github.com/louisdx/unpage

During the run, you get lots of errors "Failed to read one byte from 0x....000, error 299 (0 bytes read)", but it is not a problem, the tool works great.


You can use Process Lasso to give a process a Memory page priority :

Beginning with Windows Vista, each memory page has a priority ranging from 0 to 7. The Standby List is divided into eight lists that each handle pages of a different priority. When the Memory Manager wants to take a page from the Standby List, it takes pages from the low-priority lists first. "

Process Lasso can help manage memory priorities by allowing persistent memory priorities to be set for processes, so that their virtual memory pages are set to a specific priority each time run.

Process Lasso has two versions : free and commercial ($18.95 with trial).