![](https://seccdn.libravatar.org/avatar/504ea95a4576e6592281bc9e2e98204f.jpg?s=120&d=mm&r=g)
nteresting. On a Windoze machine, when you start a program, it loads two copies of the program into memory, one into cache and one into active memory. If you close the program, the active memory area is freed, but the cached copy stays there until you do a restart or until the memory runs low and Windoze needs to reuse it. If you turn right around and re-start the program, the program is copied from the cache area of RAM over to the active memory area (a memory to memory copy), so that it starts faster the second time. Is this the same thing with swap on Linux? Is everything in "used" also in "cached", along with some copies of programs that are no longer executing (I e., the memory is available for re-use, if necessary, but also available for a fast load of the program)? In some cases yes. Remember that a program is not necessarily copied to backing store (eg. swap space), and sometimes only part of the program may be resident. I have not looked at the 2.6 kernel VM spec, but AFAIK, the system does not release all the pages. In some Unix systems in the past,
On Friday 29 July 2005 12:44 am, Greg Wallace wrote: the VM would keep programs in RAM for a while until it had to reuse those pages. -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9