Windows has more free ram after closing Prime95

darkstar845

Distinguished
Mar 29, 2010
230
1
18,680
I am just curious on how or why is this happening.
When I close Prime 95 after Blend Test or when I close a memory intensive game or application, my Windows 7 memory consumption will only become 900mb. But before opening and running Prime 95 after Windows boots up, my memory consumption is 1.3 GB.
 

a little black duck

Distinguished
Oct 31, 2011
646
0
19,160
When you close a program it frees up the resources it was using, hence, your system will use less memory. If every installed program required allocated memory, whether it was running or not, the number of progams we could install would be limited by the amount of ram the pc has, not the size of its' HDD.
 
Makes sense.

What happens is when Prime95 runs, it needs a LOT of RAM during the blend test. Because Prime95 is the foreground application, its threads have priority over every other userland application. As a result, other background apps will run a lot less once Prime95 starts testing.

As a result of this, because these other programs are not running, the RAM they had allocated will be moved to disk when Prime95 requests more RAM. So while these processes still have the same memory footprint, their data has been moved to the HDD, rather then remaining in RAM.

Then you close Prime95. All the RAM space it currently used becomes marked as "free", and you suddenly find you have more space then you did before.

This is the classic example of the difference between "RAM" and "Address Space". The background applications are using the same total amount of Address Space, but Prime95 forced their data from RAM to the HDD, reducing RAM usage once Prime95 closed down. Once these applications get a chance to run and need to use that data again, RAM usage would return close to what it previously was before you ran Prime95.


I HOPE I explained that easily enough...
 

nbelote

Distinguished
Oct 5, 2009
953
0
19,160
Also, when you first boot up Windows, it uses your RAM to load background services and applications. The loading process takes up memory as well as the actual RAM that the service/process/application uses and that used RAM doesn't become free until the loading process is done. This can take a while, even if you don't notice a decrease in speed.

You are probably looking at your RAM usage before everything is done loading and then you subsequently open a game or Prime95 on top of that.