The default should be that the swap file/ virtual memory is activated.
There are commands you can use to turn on and turn off virtual memory.
See the info here: How to Modify the Virtual Memory in a Mac | Tech Tips - Salon.com Reactivate the Swap FileStep 1
Open the Terminal program. Step 2
Type this command in the terminal window: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist Step 3
Close the Terminal program.Deactivate the Swap FileStep 1
Open the Terminal program. You'll find it in the Utilities folder under the Applications folder.Step 2
To turn off the swap file, type this command into the Terminal window: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plistStep 3
To remove the swap files on your system, type this command into the Terminal window: sudo rm /private/var/vm/swapfile*Step 4
Close the Terminal program.