This question already has an answer here:
Why have one file, the swap file, with 2 purposes:
- a swap file that serves the purpose for both providing some extra memory for apps (swap)
- and also for storing the state of the entire system (suspend-to-disk/hibernation)?
In Windows, there appears separate file for each purpose:
- Swap: For swapfile.sys for Windows 10 (pagefile.sys does the same job for older versions) and
- hiberfil.sys is for the image of the system state in RAM for when the system is hibernated.
Wouldn't that be easier for decision making as to what size of swap to use (and what size needed for hibernation)?
Also, why would a file the size of all the RAM be needed for hibernation, if only one app is running consuming, for example, 1Gb out of 32Gb?
Question based on the discussion around the swap size decision making process here: What should my swap size be if I have 32GB of RAM? [closed]