Swap space - The Answer

Richard Lightman richard at nezumi.plus.com
Tue Nov 12 00:19:28 PST 2002


* Dan Osterrath <do3 at mail.inf.tu-dresden.de> [2002-11-12 08:00]:
> 
> Another example:
> Program x is executed and modifies its own code in memory. (For example there 
> is a counter in the code segment.) When it is swapped and re-read the counter 
> would be set to the initial value.
> 
Code is loaded from the filesystem, and mapped as shared, read only.
When you try to write to it, you will get a different mapping that
is not shared, but is rw. This mapping can get swapped out and read
back from swap. Tasks that have not modified the code can continue
to use the other mapping that is backed by the filesystem.

Richard
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list