Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Nov 2009 12:42:25 -0600
From:      Alan Cox <alc@cs.rice.edu>
To:        Ed Schouten <ed@80386.nl>
Cc:        alc@freebsd.org, freebsd-hackers@freebsd.org, Alexander Best <alexbestms@math.uni-muenster.de>
Subject:   Re: mmap(2) with MAP_ANON honouring offset although it shouldn't
Message-ID:  <4AF1CB11.2090503@cs.rice.edu>
In-Reply-To: <20091104183434.GB1293@hoeg.nl>
References:  <permail-200910211551041e86ffa80000182a-a_best01@message-id.uni-muenster.de> <ca3526250910211051v2fef55e7yda262a58df200751@mail.gmail.com> <20091103172452.GU1293@hoeg.nl> <200911040812.18712.jhb@freebsd.org> <20091104162646.GZ1293@hoeg.nl> <4AF1C707.6000706@cs.rice.edu> <20091104183434.GB1293@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Ed Schouten wrote:
> * Alan Cox <alc@cs.rice.edu> wrote:
>   
>> 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.
>>     
>
> Something like this?
>
> Index: mman.h
> ===================================================================
> --- mman.h      (revision 198919)
> +++ mman.h      (working copy)
> @@ -82,6 +82,9 @@
>   */
>  #define        MAP_FILE         0x0000 /* map from file (default) */
>  #define        MAP_ANON         0x1000 /* allocated from memory, swap space */
> +#ifndef _KERNEL
> +#define        MAP_ANONYMOUS    MAP_ANON /* For compatibility. */
> +#endif /* !_KERNEL */
>  
>  /*
>   * Extended flags
>
>   

Yes.  If no one objects in the next day or so, then please commit this 
change.

Alan




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AF1CB11.2090503>