How to "swap in" again memory from page file to physical memory in Windows at once (like linux swap-off)
Is there a way to swap back in (to put back all the memory data that was put into the page file (or swap, whatever you prefer)) memory on a windows PC?
On linux, one can easily do this with the swapoff /dev/sdaX, where X is the swap partition. On windows, it seems to ask me to reboot each time..
The reason I'd like to do this, is that, even though swapping out the data to the swap file allows me to play a resource-hungry game fully in physical ram, when I stop the game, all the rest of my programs run slow. This is or course normal; all the programs were pushed into the page file because my RAM was too small, and all memory access to those programs after gaming bumps into hard page faults, with major delays and some frustration as a consequence.
However, that frustration could easily be avoided, by simply allowing the PC to copy all data back into the physical memory for a minute or so, and then resume working on a fast working PC! (rather than having to endure the slowness -while- working)
Thanks in advance for any advice on this!
Kind regards
Unfortunately, no. The way Windows virtual memory system works, many of the pages simply can't be mapped until they fault and can't be stored in memory unless they're mapped. So Windows has to wait until the pages are accessed.
Unfortunately there is no such option.
The only way to decrease swapping in Windows is to increase the physical RAM.