Re: mmap() page swapping location?

From: Chris Quinn (
Date: Wed Aug 02 2000 - 13:57:34 EST

"Juan J. Quintela" wrote:

> not at all, the only differece between MAP_PRIVATE and MAP_SHARED is
> that you need to do an msync with MAP_PRIVATE to write to the disk,
> with MAP_SHARED the write to the disk will be an any time.

I tested this with a trivial program under 2.2.12-20/gcc 2.91.66,
and where MAP_PRIVATE was exchanged for MAP_SHARED the result was different! ie. after an msync(), munmap() and then close(), the accessed
file remained unchanged in the former case.
How sure are you?!


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:09 EST