Windows XP memory tweak to free all unused memory when you close applications

Link19

Senior member
Apr 22, 2003
971
0
0
Whenever I open a bunch of applications and then close them, I notice that the amount of physical RAM available as shown in Task Manager is considerbly less than when I first boot up my system. I have 1GB of physical RAM in my system and the amount available upon bootup is approximiately 808 thousand some KB. The system cache is about 110 thousand some KB upon bootup. Whenever I leave my system on for a while without rebooting and open a bunch of applications and then close all of them, the system cache goes way up and the amount of available physical memory decreases significantly. I assume all that RAM is being used for the system cache right? The amount of available RAM I have after running my system for a while after opening and closing a bunch of applications is anywhere from 704 thousand some KB to 730 thousand some KB. The system cache ranges from 700 thousand some KB to 800 thousand some KB.

I don't want all that RAM to be used to help the system cache grow that large and I want all the RAM freed whenever I close all applications so I have 808 thousand some KB available again just like I do upon bootup. I want the system cache to stay around 110 thousand some KB to 200 thousand some KB because if the system cache is too low, your system will tax the HDD like crazy. So are there any tweaks that actually work that I can apply so this will happen? I thought the AlwaysUnloadDLL tweak is what I needed, but I have read that it is bogus and doesn't work. So, any legitimate tweaks that work?
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
There really should be no need for doing that unless you are hitting the page file significantly..... which I highly doubt.
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
AFAIK, the RAM used for the system cache will be dynamically freed for reuse when you need it. Kicking the data back out of cache is useless, since if you open the same files again before the cache has been 'naturally' flushed, it saves having to bring the files back in from disk.

Unless I'm misunderstanding what you're asking about.
 

Link19

Senior member
Apr 22, 2003
971
0
0
Originally posted by: Matthias99
AFAIK, the RAM used for the system cache will be dynamically freed for reuse when you need it. Kicking the data back out of cache is useless, since if you open the same files again before the cache has been 'naturally' flushed, it saves having to bring the files back in from disk.

Unless I'm misunderstanding what you're asking about.



I'm talking about why is it that your available physical RAM is still less even after you close all open applications? What I mean by that is why is it less than it was when you first booted your system before you ever opened any applications? When I close all open applications, I would expect my physical RAM available to go back to as high as it was when I first booted my system.
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: Link19
I'm talking about why is it that your available physical RAM is still less even after you close all open applications? What I mean by that is why is it less than it was when you first booted your system before you ever opened any applications? When I close all open applications, I would expect my physical RAM available to go back to as high as it was when I first booted my system.

Why would you want it to be? The OS has watched you open an application then close it. What are the chances you'll open it again? If you do, it will open faster. If you don't the memory is freed immediately when needed by something else.

It's called memory managment. There is a great deal of cleverness that goes into it. A very naive view is that the more unused RAM you have the better. Unused ram is like any other unused resource: it's wasted.

Does this explain what you're seeing?

There is also a phenomenon called a memory leak in which an application requests and frees memory but each time doesn't quite return all the requested memory. Over time you'll get low and problems will happen. This is usually seen while an application is running, not after it's closed. I would guess you are NOT seeing a memory leak, but rather some healthy memory management at work.
 

Link19

Senior member
Apr 22, 2003
971
0
0
Why would you want it to be? The OS has watched you open an application then close it. What are the chances you'll open it again? If you do, it will open faster. If you don't the memory is freed immediately when needed by something else.

It's called memory managment. There is a great deal of cleverness that goes into it. A very naive view is that the more unused RAM you have the better. Unused ram is like any other unused resource: it's wasted.

Does this explain what you're seeing?

There is also a phenomenon called a memory leak in which an application requests and frees memory but each time doesn't quite return all the requested memory. Over time you'll get low and problems will happen. This is usually seen while an application is running, not after it's closed. I would guess you are NOT seeing a memory leak, but rather some healthy memory management at work.

Thanks, that explains it. So, just because I see less unused RAM available, doesn't mean I really have less available to run a memory intensive game. It is just stored as cache for a bunch of programs I already opened, and if that bit is needed, it will be freed and allocated to the resource intensive game, instead of that same RAM being unused before it was allocated to the resource intensive game. AM I correct?
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
Originally posted by: Link19
Why would you want it to be? The OS has watched you open an application then close it. What are the chances you'll open it again? If you do, it will open faster. If you don't the memory is freed immediately when needed by something else.

It's called memory managment. There is a great deal of cleverness that goes into it. A very naive view is that the more unused RAM you have the better. Unused ram is like any other unused resource: it's wasted.

Does this explain what you're seeing?

There is also a phenomenon called a memory leak in which an application requests and frees memory but each time doesn't quite return all the requested memory. Over time you'll get low and problems will happen. This is usually seen while an application is running, not after it's closed. I would guess you are NOT seeing a memory leak, but rather some healthy memory management at work.

Thanks, that explains it. So, just because I see less unused RAM available, doesn't mean I really have less available to run a memory intensive game. It is just stored as cache for a bunch of programs I already opened, and if that bit is needed, it will be freed and allocated to the resource intensive game, instead of that same RAM being unused before it was allocated to the resource intensive game. AM I correct?

Yes. Windows just names the fields in Task Manager poorly. "Available" RAM is really going unused (not being used for anything, even cache); what measures the amount of (virtual) RAM being asked for by all your programs is "Commit Charge".