From owner-freebsd-questions Mon Dec 18 20:16:16 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id UAA19053 for questions-outgoing; Mon, 18 Dec 1995 20:16:16 -0800 (PST) Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id UAA18918 for ; Mon, 18 Dec 1995 20:16:01 -0800 (PST) Received: from corbin.Root.COM (corbin [198.145.90.50]) by Root.COM (8.6.12/8.6.5) with ESMTP id UAA02144; Mon, 18 Dec 1995 20:14:30 -0800 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.12/8.6.5) with SMTP id UAA02973; Mon, 18 Dec 1995 20:14:43 -0800 Message-Id: <199512190414.UAA02973@corbin.Root.COM> To: A JOSEPH KOSHY cc: freebsd-questions@freebsd.org Subject: Re: Undumping vs. MMAP'ing In-reply-to: Your message of "Tue, 19 Dec 95 09:15:42 +0530." <199512190345.AA128034742@fakir.india.hp.com> From: David Greenman Reply-To: davidg@Root.COM Date: Mon, 18 Dec 1995 20:13:27 -0800 Sender: owner-questions@freebsd.org Precedence: bulk >A question for VM people: > >If I remember right, the rationale behind Emacs dumping and unexecing >itself was to be able to move byte-compiled lisp code into its text segment >so that it could be shared across multiple invocations of the program. > >Now will this sharing be done by the VM layer in FreeBSD if I mmap a file >read-only and shared across multiple processes? Yes, if multiple processes map a file the memory will be shared. If the file is mapped read/write shared, then changes made by others will be seen in all processes. If the file is mapped "MAP_PRIVATE", then changes will not be seen by other processes (the modified page is first copied), but unmodified portions will continue to be shared. -DG