From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 4 18:34:35 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5DFC10656A6; Wed, 4 Nov 2009 18:34:35 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 823B18FC30; Wed, 4 Nov 2009 18:34:35 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 9176B1CCCB; Wed, 4 Nov 2009 19:34:34 +0100 (CET) Date: Wed, 4 Nov 2009 19:34:34 +0100 From: Ed Schouten To: Alan Cox Message-ID: <20091104183434.GB1293@hoeg.nl> References: <20091103172452.GU1293@hoeg.nl> <200911040812.18712.jhb@freebsd.org> <20091104162646.GZ1293@hoeg.nl> <4AF1C707.6000706@cs.rice.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+31Goo6fsQAntfNs" Content-Disposition: inline In-Reply-To: <4AF1C707.6000706@cs.rice.edu> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: alc@freebsd.org, freebsd-hackers@freebsd.org, Alexander Best Subject: Re: mmap(2) with MAP_ANON honouring offset although it shouldn't X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2009 18:34:36 -0000 --+31Goo6fsQAntfNs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Alan Cox 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 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--