DLLs resident in memory

J

juliadream

One thing I could never understand about Windows XP (as opposed to Unix) is
that, even when I close ALL applications, not all the memory is returned
back to the system. Recently I read that when a Windows application is
closed, some of the associated DLLs remain in memory (so that the
application can re-launch faster the next time). This would certainly
explain the memory issue.

How would I be able to see all the DLLs in memory? The Task Manager only
shows me applications and processes.

More importantly, how do I identify and kill the DLLs associated with the
applications in question?
 
R

Rick \Nutcase\ Rogers

Hi,

Basically, you have to flush the memory cache, but Windows will do this
automatically if the ram is needed elsewhere. Part of the memory management
design is to find use for as much of the available ram as possible, even if
it's only for caching. This does not inhibit operation in any way.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Associate Expert - WindowsXP Expert Zone

Windows help - www.rickrogers.org
 
M

Malke

juliadream said:
One thing I could never understand about Windows XP (as opposed to
Unix) is that, even when I close ALL applications, not all the memory
is returned
back to the system. Recently I read that when a Windows application
is closed, some of the associated DLLs remain in memory (so that the
application can re-launch faster the next time). This would certainly
explain the memory issue.

How would I be able to see all the DLLs in memory? The Task Manager
only shows me applications and processes.

More importantly, how do I identify and kill the DLLs associated with
the applications in question?

You could look at one of the free process explorer type tools from
Systernals. But why are you bothered about this? Are you having a
problem? When you close out of a program in a *nix system, there are
still lots of processes going on in the background, libraries, etc. Do
a ps axu to see. Or run top. If you are having problems with a Windows
system, please post back with details of the problem and the system so
we can help you.

Malke
 
K

Ken Blake

In
juliadream said:
One thing I could never understand about Windows XP (as opposed
to
Unix) is that, even when I close ALL applications, not all the
memory
is returned back to the system. Recently I read that when a
Windows
application is closed, some of the associated DLLs remain in
memory
(so that the application can re-launch faster the next time).
This
would certainly explain the memory issue.


Yes, but this isn't a problem. It helps you, but doesn't hurt. If
the memory is subsequently needed by other apps, it will
automatically be released for them.

How would I be able to see all the DLLs in memory? The Task
Manager
only shows me applications and processes.

More importantly, how do I identify and kill the DLLs
associated with
the applications in question?


No need to do this. It works well, and you shouldn't interfere
with it.
 
J

juliadream

You could look at one of the free process explorer type tools from
Systernals. But why are you bothered about this? Are you having a
problem? When you close out of a program in a *nix system, there are
still lots of processes going on in the background, libraries, etc. Do
a ps axu to see. Or run top. If you are having problems with a Windows
system, please post back with details of the problem and the system so
we can help you.


Certainly. Here are the details. The scenario is the same for Windows XP
(which I use at home) and Windows 2K (which I use at work). Both machines
have 512MB of RAM. Once I run a few compute-intensive applications
simultaneously, both systems become (understandably) slow and unresponsive.
Common sense would dictate that if I were to close all these applications,
the Windows systems would become as fast and responsive as they were before
I launched the applications. Unfortunately, that' not the case. I usually
end up having to reboot the machines to get optimal performance back.

Task Manager is giving me no clues. If it's not the resident DLLs, then
what could it be?
 
M

Malke

juliadream said:
Certainly. Here are the details. The scenario is the same for
Windows XP
(which I use at home) and Windows 2K (which I use at work). Both
machines
have 512MB of RAM. Once I run a few compute-intensive applications
simultaneously, both systems become (understandably) slow and
unresponsive. Common sense would dictate that if I were to close all
these applications, the Windows systems would become as fast and
responsive as they were before
I launched the applications. Unfortunately, that' not the case. I
usually end up having to reboot the machines to get optimal
performance back.

Task Manager is giving me no clues. If it's not the resident DLLs,
then what could it be?

You could be having problems with these "compute-intensive (sic)"
programs for many reasons - what are the programs? Perhaps they require
more than 512MB of RAM. Perhaps they are badly coded. Perhaps your
processors are too slow. Perhaps your hard drives are slow or full.
Perhaps you have too many extraneous programs/processes running in the
background. Perhaps you have viruses and/or malware sucking up your cpu
cycles.

There isn't any way for me to tell from the information you've provided.
Did these machines perform well with these particular programs before?
If so, what changed?

In the meantime, aside from doing the normal maintenance (disk cleanup,
defrag, etc.) and troubleshooting for malware - try some clean boot
testing:

Clean Boot - http://support.microsoft.com/default.aspx?kbid=310353
and How to Troubleshoot By Using the Msconfig Utility in Windows XP -
http://support.microsoft.com/?id=310560

Malke
 
N

NoMoreMrNiceGuy

juliadream said:
One thing I could never understand about Windows XP (as opposed to Unix) is
that, even when I close ALL applications, not all the memory is returned
back to the system. Recently I read that when a Windows application is
closed, some of the associated DLLs remain in memory (so that the
application can re-launch faster the next time). This would certainly
explain the memory issue.

How would I be able to see all the DLLs in memory? The Task Manager only
shows me applications and processes.

More importantly, how do I identify and kill the DLLs associated with the
applications in question?

I think there is a registry key which instructs the system to unload
dlls when the application is closed.....at least there was for Win 2000.
Sorry I can't remember the name or location. Maybe someone else can

Norm
 
H

HeyBub

juliadream said:
One thing I could never understand about Windows XP (as opposed to
Unix) is that, even when I close ALL applications, not all the memory
is returned back to the system. Recently I read that when a Windows
application is closed, some of the associated DLLs remain in memory
(so that the application can re-launch faster the next time). This
would certainly explain the memory issue.

How would I be able to see all the DLLs in memory? The Task Manager
only shows me applications and processes.

More importantly, how do I identify and kill the DLLs associated with
the applications in question?

Assume X.DLL remains in memory after completing its chores. One of two
things will ultimately happen:

1. X.DLL will be needed again, in which case you save the time it would take
to fetch it from disk, or
2. Some other task needs the memory, in which case X.DLL will be
over-written and you'll save nothing.

So, in one case, you save a few milliseconds. In the other case, there's no
gain or loss.

Look, there's always SOMETHING in memory (even if only zeros). Why not have
something potentially useful?
 
D

DevilsPGD

In message <[email protected]> "juliadream"
One thing I could never understand about Windows XP (as opposed to Unix) is
that, even when I close ALL applications, not all the memory is returned
back to the system. Recently I read that when a Windows application is
closed, some of the associated DLLs remain in memory (so that the
application can re-launch faster the next time). This would certainly
explain the memory issue.

What memory issue?

In the same way memory can be paged to disk, data from the disk can be
paged into memory. The is similar (Although not quite the same) as disk
caching.

It's harmless, if you actually need the RAM for anything (including the
disk cache) it will be released, but otherwise it's no more wasted then
if it was empty.
 
D

DevilsPGD

In message <[email protected]> "juliadream"
Certainly. Here are the details. The scenario is the same for Windows XP
(which I use at home) and Windows 2K (which I use at work). Both machines
have 512MB of RAM. Once I run a few compute-intensive applications
simultaneously, both systems become (understandably) slow and unresponsive.
Common sense would dictate that if I were to close all these applications,
the Windows systems would become as fast and responsive as they were before
I launched the applications. Unfortunately, that' not the case. I usually
end up having to reboot the machines to get optimal performance back.

Chances are what has happened is that the needed program data has been
swapped out, the slowdown is waiting for the data to be swapped back.
 
D

David Candy

There are many things you could be talking about.

cmd /k tasklist /m

Note system dlls appear in memory multiple times but aren't (unless your program has done something wrong). Windows is a demand load system. This means it gets the desktop up as quickly as possible and delays loading many components that are to be permanently in memory until first use. Fonts are an example.

Explorer always leaves third party dlls in memory for a few minutes after use (if you right click one file then it is likely you'll do a second).

Also there is a file cache. If a file is required again it is in the cache. It is excuted from the cache.

Even if what you think is true was (it isn't) your conclusions are still irrelevent. If it's not used it will be swapped out. As it's a dll then it is swapped to the dll file, that is windows dumps it from memory (doesn't need to write as dll files don't change) as it knows it can reload it from the dll file.

As the program told windows to load the file, the program expects to be able to jump to that memory address - it won't check as it checked when it told windows to load the dll file. So you will crash.

Remember Windows is far smarter than you. Stop trying to cripple your machine. Windows is an adaptive tuning machine designed to run on hardware that is designed to page. Open documents are becoming page file type opening rather than stream type opening because it's fast. So if memory isn't needed it will be paged out. If needed it will be paged in. Everything else is designed around this principal. Don't screw it up.
 
R

Rick \Nutcase\ Rogers

Hi,

It may be that the program(s) itself/themselves are not properly releasing
the stack upon termination (aka "memory leak"). This would be due to poor
programming or a conflict between applications, not a problem with memory
management - meaning it would occur under any OS. The process watcher from
sysinternals can probably catch this, watch for unterminating threads.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Associate Expert - WindowsXP Expert Zone

Windows help - www.rickrogers.org
 
A

Al Dykes

Certainly. Here are the details. The scenario is the same for Windows XP
(which I use at home) and Windows 2K (which I use at work). Both machines
have 512MB of RAM. Once I run a few compute-intensive applications
simultaneously, both systems become (understandably) slow and unresponsive.
Common sense would dictate that if I were to close all these applications,
the Windows systems would become as fast and responsive as they were before
I launched the applications. Unfortunately, that' not the case. I usually
end up having to reboot the machines to get optimal performance back.

Task Manager is giving me no clues. If it's not the resident DLLs, then
what could it be?



Have you looked at the View/Select Colums option in Task Manager ?
There's lots there. perfom.exe will tell you more about what your
system than task manager
 
T

T. Waters

Al said:
Have you looked at the View/Select Colums option in Task Manager ?
There's lots there. perfom.exe will tell you more about what your
system than task manager

Al, thanks for the info.
Best tip I've read all week!
 
R

Rick \Nutcase\ Rogers

Yes, but often not immediately thus causing a performance lag when a
misbehaving application is terminated. Eventually, left to its own devices,
the OS will return performance to normal as the cached files are purged.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Associate Expert - WindowsXP Expert Zone

Windows help - www.rickrogers.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top