From owner-freebsd-hackers Tue Dec 10 13:40:52 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id NAA03429 for hackers-outgoing; Tue, 10 Dec 1996 13:40:52 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id NAA03422; Tue, 10 Dec 1996 13:40:45 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id OAA04884; Tue, 10 Dec 1996 14:19:42 -0700 From: Terry Lambert Message-Id: <199612102119.OAA04884@phaeton.artisoft.com> Subject: Re: Multiple Buffer allocation of Shared Memory To: dyson@freebsd.org Date: Tue, 10 Dec 1996 14:19:42 -0700 (MST) Cc: terry@lambert.org, scrappy@hub.org, erich@lodgenet.com, hackers@freebsd.org In-Reply-To: <199612102033.PAA00573@dyson.iquest.net> from "John Dyson" at Dec 10, 96 03:33:11 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > John? How does mmap'ing /dev/zero work? > > It was hacked in, as it has not previously existed in BSD. (MAP_ANON > is the canonically correct way in BSD.) Does POSIX require /dev/zero? No... I don't think so, anyway. It's a SystemV'ism; but then again, POSIX is mostly a codification of SystemV semantics, so it might. I think it's outside the name space, though, like truncating files to be larger. The reason I mentioned it was that the fd is usable as a key to get the same area mapped into multiple processes without them needing to be parent/child, with the mapping preeestablished in the parent. I'm not clear on how I get several processes using the same region in the MAP_ANON case... is it even possible? The man page says a non -1 fd "is used for naming"... how does that work? Is it an index, or is it just an ID? Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.