From owner-freebsd-current Fri Mar 15 18:34:33 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA21409 for current-outgoing; Fri, 15 Mar 1996 18:34:33 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id SAA21403 Fri, 15 Mar 1996 18:34:17 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id TAA14695; Fri, 15 Mar 1996 19:28:53 -0700 From: Terry Lambert Message-Id: <199603160228.TAA14695@phaeton.artisoft.com> Subject: Re: -current and accelx To: dawes@rf900.physics.usyd.edu.au (David Dawes) Date: Fri, 15 Mar 1996 19:28:53 -0700 (MST) Cc: toor@dyson.iquest.net, sos@FreeBSD.org, coredump@nervosa.com, mmead@Glock.COM, current@FreeBSD.org In-Reply-To: <199603160127.MAA14131@rf900.physics.usyd.edu.au> from "David Dawes" at Mar 16, 96 12:27:20 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-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > I'm don't have any ideas about AccelX, but after looking at the changes > in vm_mmap.c, I tried adding MAP_SHARED to the mmap() flags in my test > program, and that fixed it when using the 1.38 version of vm_mmap.c. > I don't understand why the mapping needs to be shared to prevent a > *parent* losing it after it has forked. We certainly don't need (or want) > the child to share the mapping. I may be mis-understanding the intention > of MAP_SHARED. It shouldn't need to be present in that case. The MAP_SHARED is supposed to mean that pages are not copy-on-write faulted, nothing more. Generally used for implementing IPC facilities. This isn't well documented in the man page, but... When the parent forks, and there is mapped memory, unless the MAP_INHERIT flag is present, the child process should lose the mapping to the address space, in all cases. Are you sure that whatever it is isn't using "vfork"? I don't know if vfork handled this correctly at all. In any case, you are not misinterpreting MAP_SHARED, IMO. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.