Re: mmap (was Linux/IA-64 byte order)

Stephen C. Tweedie (sct@redhat.com)
Thu, 18 Mar 1999 18:45:12 GMT


Hi,

On Wed, 10 Mar 1999 00:27:36 +0200, Itai Nahshon <nahshon@actcom.co.il>
said:

> Some discussions on this thread made me more
> curiuos... (sorry if that's a really dumb question).

> I see that the text section of executable files
> or shared objects is mmapped as private.

Yes...

> Will pages that are not modified still be shared?

Absolutely.

> If swapping takes place, will clean pages go to the swap
> space or are they simply discarded (and reloaded
> on demand from the file?

They are just thrown out and repaged from the original file as
necessary. This is required semantics: until a MAP_PRIVATE page gets
modified, the kernel guarantees that the page continues to reflect the
latest contents of the file if the file is modified.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/