Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Nov 2009 19:34:34 +0100
From:      Ed Schouten <ed@80386.nl>
To:        Alan Cox <alc@cs.rice.edu>
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:  <20091104183434.GB1293@hoeg.nl>
In-Reply-To: <4AF1C707.6000706@cs.rice.edu>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--+31Goo6fsQAntfNs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 spac=
e */
+#ifndef _KERNEL
+#define        MAP_ANONYMOUS    MAP_ANON /* For compatibility. */
+#endif /* !_KERNEL */
=20
 /*
  * Extended flags

--=20
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

--+31Goo6fsQAntfNs
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkrxyToACgkQ52SDGA2eCwXB0QCfer7jg+fLcYA3wy0j1oTkTK5k
EeAAn0jJHNJf+/wfrm+RlKqzZ9+9vtY4
=kWRu
-----END PGP SIGNATURE-----

--+31Goo6fsQAntfNs--



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