Infesting you with Virus News
 

Tips

Forcing Windows to Unload DLLs from Memory

 

Windows Explorer caches DLLs (Dynamic-Link Libraries) in memory for a period of time after the application that is using them has been closed . This could be an inefficient use of memory on low memory systems, altogether it may cause problems or delays for programmers who are developing with Windows DLL files.

  • Create a new sub-key. It is called 'AlwaysUnloadDLL'. Then set the default value to equal '1' if you want to disable Windows caching the DLL in memory.
  • Restart Windows to enable the modification.

 

Registry Editor Example
| Name Type Data |
| left (Default) REG_SZ "1" |
-
| HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion... |
-

 

Registry Legend
System Key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AlwaysUnloadDLL]
Value Name:
Default
Data Type:
REG_SZ (String Value)
Value Data:
(1 = enable)

User Comments

D.J. August 5, 2009
Larry, You obviously have a great deal more faith in window$ than the vast majority of the world.

Windows does not effectively manage virtual memory. If you open and close a number of programs over time your memory, both real and virtual (swap file) will continue to grow until windows stops the system to expand the size of the swap file. If you examine the usage of your memory under these circumstances, you'll find that numerous .dll files are held up in memory for programs that are no longer running.

Getting un-used files out of memory frees up memory for programs that are actually running and requires less use of the swap file resulting in a faster system.
Dan January 9, 2009
To Larry:

So that explains why loading one program the first time takes longer than the next times you try after shutting it down!
vishwadeep January 7, 2009
it nice working
Admin January 2, 2009
Larry,

Wow! I can't believe it. We will look into this on Monday. Have a good weekend and a good new years
Larry Miller January 2, 2009
The author obviously has no understanding of how memory is managed in a virtual memory system. To improve performance XP will always attempt to find some use for as much memory as possible, even if it is only of trivial value. Any use of memory, any use at all, is better than no use at all. Free memory is wasted memory and the enemy of performance.

This process is known as caching. Caching has had a long and distinguished history in computer systems and it is highly developed in XP. XP has a complex and efficient system for reclaiming the memory used by caching - when it is needed. Until that time comes the memory will remain in use and working to improve performance.

The author is proposing that you interfere with a process he clearly does not understand.

Larry Miller
Microsoft MCSA
Name:
Email:
Website:
Comment:
Please type 5-digit security code below:
Captcha image for spam protection

Latest Comments

September 3, 2010
how can i remove sdfsdf, i cannot get into windows? more..
September 3, 2010
hi here is parteek kaushal i just want to tell that smone has copied my pics with my frnd n she is abusing... more..
September 3, 2010
Hello I am new here. Im sorry if this is not the right place for this post. My name... more..
more comments..
rss
Home > Tips > Registry > Windows > System > Forcing Windows to Unload DLLs from Memory