On Mon, May 15, 2006 at 10:06:29PM +0200, Michael Kerrisk wrote: > > > > changes: > > > > make mmap.2 reference mincore > > > > > > Done, for 2.33. > > > > > > > explicitly state that a read-only MAP_PRIVATE is equivalent to > > > > MAP_SHARED > > > > > > *why?* You do not explain what benefit this serves. > > Because, upon reflection, it isn't immediately clear from the wording > > of the page as it exists now. In particular: > > > > Create a private copy-on-write mapping > > Umm -- we were talking about read-only mappings? Yes; I wish to make it clear that, for a read-only map, the behaviour is the same.
> > This could be interpretted as meaning "create a new mapping, even if > > the file is already mapped", which isn't what people usually want, and > > isn't what it does anyway.. > > > > > > An alternative would be to take the commented-out Linus quote > > > > embedded > > > > in mmap.2 which says precisely what I want and create a NOTES section > > > > out of it. > > Let me put things another way: why should a programmer care > about whether read-only mappings are done the same way > internally for both MAP_SHARED and MAP_PRIVATE? A programmer should care whether using MAP_PRIVATE uses extra resources than a MAP_SHARED (both maps presumably have some overhead, for the initial mapping and for each additional mapping). I question whether this is presently as clear as it should be. I think it is typical to need to have *some* understanding of a lower layer interface than one uses directly, even if the full implementation details are deliberately opaque. Would it be better to change the descriptions of MAP_{PRIVATE,SHARED} themselves? If you think so, I can suggest something. Justin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]