Subject: Re: direct copy() between two proc address spaces
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 06/21/2004 16:16:40
--Apple-Mail-8-30934963
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed


On Jun 21, 2004, at 1:55 PM, Jonathan Stone wrote:

> Would it help if we redefine MAP_ANON|MAP_SHARED mmap()s to allow a
> valid fd, and use the supplied fd to find the (single, 
> by-new-definition,
> to-be-shared) anon object? Or would that break standards conformance?

Passing a file descriptor pretty much means the memory is *not* 
anonymous, eh?

The /dev/zero hack originated from SunOS ... it didn't have the 
MAP_ANON flag, but rather retrofitted anonymous memory mapping into its 
VM system by adding the /dev/zero hack.  Subsequent BSD systems have 
retained that hack for compatibility, since some applications grew to 
rely on it.

If you want "named" "anonymous" memory, for now you should use System V 
shared memory.  Once day we will get POSIX Real Time shared memory, and 
will have that API available to us, as well.

But, please, let's not suggest more hacks upon hacks... let's use the 
"standard" APIs we already have that allow for named swap-backed shared 
memory.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>


--Apple-Mail-8-30934963
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFA12xZOpVKkaBm8XkRAhtqAJ9Pf8/lQgR5c151eqFftGSWIIs37gCgvTyL
LhRA5J1/Gan+zKO9SHx+Td8=
=78dh
-----END PGP SIGNATURE-----

--Apple-Mail-8-30934963--