Unload.dll’s to Free Memory

Monday, March 31, 2008 22:53
Posted in category Hints, Howtos, Tips

Wanna see some fresh Tv Shows News?

Put Your Ad Here Too

Unload.dll’s to Free Memory

Windows Explorer caches DLLs (Dynamic-Link Libraries) in memory for a period of time after the application using them has been closed. This can be an inefficient use of memory.Find the key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer]. Create a new sub-key named ‘AlwaysUnloadDLL’ and set the default value to equal ‘1′ to disable Windows caching the DLL in memory. Restart Windows for the change to take effect.I tried this after running a intense program,then watched the task manager;memory recovered it self.

You can leave a response, or trackback from your own site.

2 Responses to “Unload.dll’s to Free Memory”

  1. Larry Miller says:

    May 13th, 2008 at 4:01 am

    Setting this value will not improve performance, it will impair it. The normal behavior of caching DLL’s is not a mistake but a carefully designed feature to improve performance. And it is not only DLL’s but the application code itself is cached. This is the way the cache system was designed. Can this be a waste of memory? Certainly, but the alternative of unloading them is worse. Windows will always attempt to always find some use for as much memory as possible. Free memory is the absolute ultimate in wasted memory.

    Windows has a complex and efficient system for reclaiming memory from cached DLL’s and program code when necessary. Until this time comes there is no need to prematurely unload them. If this is done and the DLL is needed again it must be reloaded, a process that may take thousands of times longer than unloading it.

    This setting was made available for the use of software developers and never as a means of improving performance.

    Windows designers know more about memory management than you do. Windows will perform better without amateurish tinkering like this. Experienced systems administrators have known this for a long time.

    Larry Miller
    Microsoft MCSA
    CompTIA Network+,A+

  2. admin says:

    May 13th, 2008 at 3:58 pm

    You are right Larry Miller!thank you for your good comments!:-)

Leave a Reply

Comment moderation is enabled. Your comment may take some time to appear.