On Tuesday 16 August 2005 10:22 pm, Shriramana Sharma wrote:
Jerry Feldman wrote:
The contents of the swap file are essentially cleared during the initial boot into multi-user mode. Any leftover garbage from a previous session is ignored.
You mean, the OS doesn't care if any garbage is left-over from a previous session but clears (without warning) the contents of the swap file, right? Yes. It actually does not clear the contents. The OS (via hardware/software) keeps track of memory pages. When it needs to evict a page to swap, it writes that out to the swap area. So, the OS always knows the status of every page that is stored in swap.
--
Jerry Feldman