Free Up Memory Automatically by Unloading DLLs in Windows 9x and NT with AlwaysUnloadDll

»»»Free Up Memory Automatically by Unloading DLLs in Windows 9x and NT with AlwaysUnloadDll

For user that still has and using Windows operating system prior to Windows 2000, such as Windows NT, Windows Me, Windows 98 and Windows 95, there is a trick to free up memory without using any third-party software utility. The trick is to force Windows to unload and free cached DLLs from memory.

Windows Explorer caches extensions DLLs (Dynamic-Link Libraries) in memory for a period of time after the application that using them has been closed or exited. Windows Shell automatically unloads a DLL when its usage count is zero, but only after the DLL has not been used for a period of time. On low memory systems, the behavior will contribute to system slowness and delays with lesser available physical memory, and cause inefficient use of memory especially when debugging or developing Windows DLL files.

In system prior to Windows Vista, user can force Windows unload the unused DLL to free up the occupied memory by using “AlwaysUnloadDLL” setting in the registry.

  1. Run Registry Editor and navigate to the following registry key:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer]
  2. Create a new sub-key named AlwaysUnloadDLL and set the default value to 1 to disable Windows caching the DLL in memory.
  3. Restart Windows for the change to take effect.

Note that the registry key is only supported on Windows prior to Windows 2000, so for Windows XP and Vista, the sub-key is useless and unnecessary, and can be safely deleted.

By |2017-11-08T13:17:02+00:00November 8th, 2017|Categories: Windows|Tags: , , , |2 Comments

About the Author:

LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.Connect with LK through Tech Journey on Facebook, Twitter or Google+.