Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When we quit a process (e.g. using Task Manager etc), Does Windows reclaim the RAM used immediately?

Or does Windows still retain the RAM used for that process?

share|improve this question
up vote 1 down vote accepted

I depends what RAM you mean. If you mean any RAM containing data modified by the process, then yes. Those values could never, ever be used again. So the RAM must be marked free.

If you mean RAM containing portions of the executable file, no, that RAM is not reclaimed. It was already marked discardable, since the system can always read the data back from disk if needed anyway. Freeing the RAM immediately would suck for two reasons:

1) It's a completely wasted effort. If the computer makes the RAM free and it isn't needed soon, the effort of making it free gained nothing. If the computer makes the RAM free and it is needed soon, the effort of making it free just forces the system to make it used again, resulting in doubled effort. (The system could just have left it discardable and switched it to another use without ever making it free.)

2) It deprives the system of the opportunity to use that data again. If the same program runs again, having the data already in RAM saves disk I/O.

share|improve this answer
in the Task Manager (i'm windows vista) there is a place that show us the "Memory". Does this memory coincides with the first RAM that you were talking about or the second RAM that you were talking about? – Pacerier Aug 29 '11 at 7:02
There are actually several "memory" fields in the task manager, but they don't correspond to either of these because while the program is running, there isn't a difference. (And generally, file data resident isn't cache isn't accounted for by process anyway. Consider if 8 copies of a program are running. Do you charge the executable to all of them?) – David Schwartz Aug 29 '11 at 12:01

Yes. The memory pages are re-assigned into the Free pool, where they can be allocated to new processes on demand. A very-low priority process in the OS will eventually zero out those pages, adding them to the Zeroed pool. You can watch this going on with Process Explorer (though they get zeroed out fast enough it's hard to see).

Pages of memory in either of these pools are free for the taking for existing or new processes. Once there are no free pages in either the Free or Zeroed pools, the OS will start to forceably page out memory from other processes to re-use pages of physical RAM as needed. There are 2 sets withing this group: Standby and Modified pages. A Standby page is one that has alread been paged out to the page file and can be re-assigned to a different process (or within the same) quickly. A Modified page has a dirty flag set and needs to be saved to the page file before it can be re-assigned.

share|improve this answer
if the RAM is reclaimed, why is it that first opening a program (eg IE or Opera or FireFox etc) it usually takes some time but after I've closed it and waited 10 minutes, and open it again it is much much faster compared to the first time? – Pacerier Jul 31 '11 at 23:02
Even though the physical RAM is freed up, most modern operating systems are smart about caching files often used, or used together. These files might be left in the page file or some other structure for easier load time. For example, you'll see a bigger benefit when the OS can pre-determine that it will need, say, 5 files at once (a.exe, b,dll, c.dll), instead of relying on the normal behavior (page faults) to load them on demand. The information will still need to be paged from disk to RAM, but will be better optimized to frontload necessary files and to avoid seeking around the hard disk. – Jimmy Jul 31 '11 at 23:53
Jimmy, can you show where in Process Explorer? – barlop Aug 28 '11 at 22:04
@barlop: In the System Information window, which can be reached by clicking on any of the performance graphs (CPU/RAM/IO) or from the View menu. – Jimmy Aug 28 '11 at 23:50
@Jimmy I don't see any bits getting zeroed out, just a graph, and if I close a big process, or a bunch like taskkill /f /im chrome.exe I see the numbers go down for System commit and physical memory which is nothing special one would see similar with task manager, but no change in the graphs, and certainly no bits getting zeroed out. – barlop Aug 29 '11 at 1:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.