In case if physical memory (RAM) isn’t enough to meet memory demand of running programs on operating system, virtual memory stored in pagefile is used. Virtual memory support uses a system pagefile to swap pages of memory to disk when they are not used. The pagefile may sometime contain sensitive information, hence an operating system have an exclusive authorization to open this well protected file. On dual or multiple boot systems, this is concern of security.
Thus, in order to increase the security of your operating system, its good step to clear this system pagefile at shutdown. Clearing out pagefile will also zeroed down hibernation file (hiberfil.sys), when hibernation is disabled.
Here’s how to allow or prevent Windows 10 to clear system pagefile at shutdown.
Page Contents
How To Allow/Prevent Windows 10 To Clear Virtual Memory Pagefile At Shutdown
WAY 1 – Via Security Policy Snap-in
1. Press + R and put secpol.msc in Run dialog box. Click OK to open Security Policy snap-in.
2. Then in Security Policy snap-in window, navigate here:
Security Settings > Local Policies > Security Options
3. In the right pane of Security Options, look for Shutdown: Clear virtual memory pagefile named setting. It must be Disabled by default, which means Windows 10 won’t clear virtual memory pagefile at shutdown.
4. Change the setting to Enabled, to allow clearing virtual memory pagefile at shutdown. Click OK. Close Security Policy snap-in.
To revert the setting to default later, restore Disabled state of policy setting.
WAY 2 – Via Registry
Registry Disclaimer: The further steps will involve registry manipulation. Making mistakes while manipulating registry could affect your system adversely. So be careful while editing registry entries and create a System Restore point first.
1. Press + R and put regedit in Run dialog box to open Registry Editor (if you’re not familiar with Registry Editor, then click here). Click OK.
2. In left pane of Registry Editor window, navigate to following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
3. Now in the right pane of Memory Management registry key, right click and select New > DWORD Value. Name the newly created registry DWORD (REG_DWORD) as ClearPageFileAtShutdown. Double click to modify the DWORD’s Value data:
4. Finally, set the Value data to 1, to allow clearing virtual memory pagefile at shutdown. Click OK. Close Registry Editor and reboot the machine to make changes effective.
To revert the setting to default later, restore 0 as Value data for ClearPageFileAtShutdown registry DWORD.
So this is how you can manage virtual memory pagefile behavior at shutdown.
That’s it!
Leave a Reply