[haiku-development] mmap(MAP_COPY) [was: Re: Re: Haiku R1/alpha updating (was decisions)]
- From: Ingo Weinhold <ingo_weinhold@xxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Fri, 08 Aug 2008 16:38:33 +0200
On 2008-08-08 at 10:30:53 [+0200], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
wrote:
> Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> > Agreed. I'd even say that MAP_COPY is superfluous, since MAP_PRIVATE
> > should
> > imply that behavior -- at least I think it's pretty inconsistent ATM.
>
> Looking at the specs, it's definitely allowed to do that; the behaviour
> in this regard is just mentioned to be "unspecified".
> The only reason for MAP_COPY would be that it's more expensive than a
> MAP_PRIVATE that always shows the current data in an unchanged page.
Yeah, I just can't think of a situation in which one would use MAP_PRIVATE
and still be fine with later changes to the file to be visible. Due to the
fact that the exact behavior is undefined according to the specs, one can't
use it in portable code without also ensuring that the mapped file is not
changed by others. And in case there are no changes, there's also no
additional overhead with consistent MAP_PRIVATE semantics.
CU, Ingo
- Follow-Ups:
- References:
- [haiku-development] Re: Haiku R1/alpha updating (was decisions)
- From: Axel Dörfler
Other related posts:
- » [haiku-development] mmap(MAP_COPY) [was: Re: Re: Haiku R1/alpha updating (was decisions)]
- » [haiku-development] Re: mmap(MAP_COPY) [was: Re: Re: Haiku R1/alpha updating (was decisions)]
- [haiku-development] Re: Haiku R1/alpha updating (was decisions)
- From: Axel Dörfler