Monday, November 24, 2008

Clearing the Page File on Shutdown

The pagefile is the virtual memory of Windows XP. It is used when there is no more suffiecent amount of RAM. Windows then moves parts of the RAM to the harddrive. However, if a program crashes some parts of it will not be deleted remaining within the pagefile. This causes this file to fragment and therefore the access to it gets slower.

You can force Windows to overwrite the pagefile with 0's everytime Windows is shut down. You'll use regedit to set this up. Click "Start" -> "Run..." and type "regedit".

regedit

In the registry navigate to "HKEY_LOCAL_MACHINE \ System \ CurrentControlSet \ Control \ Session Manager \ Memory Management". In the right window locate the string "ClearPageFileAtShutDown" and double-click on it.


Just change the value to 1. Now everytime you shut down Windows the pagefile will be cleared.

Notice that clearing the pagefile may cause the shutdown of Windows to take much longer. In this case you might want to disable it by setting the above registry key to 0.

No comments:

Post a Comment