mmap(2) with MAP_ANON honouring offset although it shouldn't

Alan Cox alc at cs.rice.edu
Wed Nov 4 18:25:21 UTC 2009


Ed Schouten wrote:
> * John Baldwin <jhb at freebsd.org> wrote:
>   
>> Note that the spec doesn't cover MAP_ANON at all FWIW.
>>     
>
> Yes. I've noticed Linux also uses MAP_ANONYMOUS instead of MAP_ANON.
> They do provide MAP_ANON for compatibility, if I remember correctly.
>
>   

For what it's worth, I believe that Solaris does the exact opposite.  
They provide MAP_ANONYMOUS for compatibility.  It seems like a good idea 
for us to do the same.

We also have an unimplemented option MAP_RENAME defined for 
compatibility with "Sun" that is nowhere mentioned in modern Solaris 
documentation.

Alan




More information about the freebsd-hackers mailing list