Windows equivalent of Linux swapon command?

0

I'm doing some memory benchmarking for research. Linux allows changing swap files at runtime with the swapon and swapoff commands.

Are there Windows commands to change page files without having to reboot the machine? I don't care about the data stored inside them, I just want to reduce the number of times I have to reboot and run another script.

Xeroxorex

Posted 2016-05-30T12:08:41.587

Reputation: 1

Answers

0

You can control page file with the following commands from the command line:

wmic pagefile list /format:list

wmic pagefileset create name="P:\pagefile.sys"

wmic pagefileset where name="P:\pagefile.sys" set InitialSize=2048,MaximumSize=2048

wmic pagefileset where name="C:\pagefile.sys" delete

However, any modification to the pagefile requires a reboot to take effect.

Keltari

Posted 2016-05-30T12:08:41.587

Reputation: 57 019