How to Unload Unused DLL's to Regain Memory in Windows XP
This registry change tells the operating system to unload DLL(dynamic link library) files every time a program is closed, most of the time whenever a program is closed the DLL's hang around in your memory in case the program is loaded again. The advantage to using this tweak is that you regain precious system memory whenever a program is closed. Included with this tutorial I added a registry file that you can simply import into your registry that would make those changes for you. Below you will find the steps necessary to accomplish this. As always comments/suggestions are welcome.
Note: I recommend this tweak for people that have below 512MB of memory or if you are a developer and would always like to have DLL unloaded when you're testing software. At higher memory levels 1GB plus, RAM is really not an issue if you're just doing basic computing (i.e. no memory intensive applications).
Follow these steps if you already have the key in your registry (to find out if you have the key follow steps 1-3 below) <<<<<
1. These tweaks require that you venture into your registry, please backup your registry.
2. Go to Start > Run when the Run box opens type in regedit
3. Your registry should have opened [Just checking...have you backed up your registry?] Navigate to the following keys; HKEY_LOCAL_MACHINE > Software > Microsoft > Windows > CurrentVersion > Explorer > AlwaysUnloadDLL
4. When you get to AlwaysUnloadDLL click on it, the pane to the right should have only one key, double-click on;
>(Default), change it to '1' (changing this enables the setting)
5. Click OK and restart your computer
Follow these steps if you do not have the key<<<<<<<<<<<<<<
6. You can download the registry file and simply merge it without having to modify the registry yourself - to get registry file Click Here
Note: When you download the file simply double-click on it, you will be prompted to confirm merging into your registry, click Yes and you're done.
Follow these steps to do it manually<<<<<<<<<<<<<<<<<<<<<
7.Navigate to the following keys; HKEY_LOCAL_MACHINE > Software > Microsoft > Windows > CurrentVersion > Explorer
8. When you get to Explorer right-click on it and select New > Key, name that key AlwaysUnloadDLL and set the value to 1
9. Click OK and restart your computer
Source:Win Guides
- 50775 reads




Incorrect information given
Incorrect information given here.
This is not correct
It is true that Windows does not immediately unload DLL's. But this was not a mistake but a carefully designed feature. This will not impair performance, even on systems with as little as 64MB of RAM. Windows is fully capable of unloading DLL's when it is necessary to recover memory. Until this time comes there is no need to unload them.
Microsoft has documented this setting is not supported on Windows 2000 and later.
http://support.microsoft.com/kb/196480/en-us
This setting was intended as an aid to software developers, not as a means of improving performance.
Larry Miller
Microsoft MCSA, Network+, A+
This is a Myth
This does not work in Windows 2000 and later. Windows will simply ignore the value. In any case the benefits were marginal. Windows does not unload dll's immediately for performance reasons and this is not normally a problem, even on low memory systems. If Windows needs the memory it will inload the dll, until that happens there is no harm in keeping it in memory. Unused memory is wasted memory.
The registry value was provided primarily for software developers, not as a performance tweak.
http://support.microsoft.com/kb/196480/en-us
Microsoft no longer supports
Microsoft no longer supports the registry key. Meaning it doesn't exist by default. Doesn't say it doesn't work.
Hard to die myth
This is hard to die myth, but it worked BEFORE Windows 2000 well. What to do on Windows 2000 and higher (XP or - god forbid - the Vista crap) I don't know.
The DLLs are unloaded by the system itself. The only one question is - can we make unload them faster?
This is a Myth
This is a Myth and does nothing:
http://mywebpages.comcast.net/SupportCD/XPMyths.html
Re: Correction
Actually, the original was correct. You want to create a new _KEY_ and set the (default) value to 1 ... all keys have a "(default)" value which can be set in addition to being able to contain additional values/keys inside it (the key, not the default value). In this case, there are no additional keys or values in the "AlwaysUnloadDLL" key ... just the default value set to 1 to enable or 0 to disable this function.
Correction:
If it doesn't exist you want to create a new "DWORD", not a new "KEY".
KEYS in registry don't have value, they are container objects.
Post new comment