Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
What you want is a "hypervisor" with multiple copies of Windows running on it. You suspend one and unsuspend the other. This is done quite a lot with other systems, but I'm not sure there's a hypervisor that can pull this off for Windows. –  Daniel R Hicks May 2 '13 at 1:32

2 Answers 2

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.

share|improve this answer
    
Maybe some sufficiently privileged third-party process could try and access those pages so they do fault? –  badp Mar 9 at 15:25
    
It wouldn't do much good for another process to access the pages. You need them faulted into the processes for the apps you're trying to use. –  Jamie Hanrahan Jul 26 at 22:10

Unfortunately there is no such option.

The only way to decrease swapping in Windows is to increase the physical RAM.

share|improve this answer
    
Or disable swap entirely. Not necessarily a windows thing, but on my Linux/BSD machines, I disable any forms of rotational swap because it does no good, and when things start to use it, instead of hitting a hard limit, they slow down everything. –  killermist May 6 '13 at 22:11
    
Disabling the pagefile will not disable paging to disk. It will only disable page-out of private committed address space. Memory mapped file contents will still be paged in and out. –  Jamie Hanrahan Aug 4 at 7:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.