From owner-freebsd-current@FreeBSD.ORG Fri Aug 20 17:36:19 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31D3816A4CE for ; Fri, 20 Aug 2004 17:36:19 +0000 (GMT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21A4F43D31 for ; Fri, 20 Aug 2004 17:36:19 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 170B972DD4; Fri, 20 Aug 2004 10:36:19 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 11E0872DCB; Fri, 20 Aug 2004 10:36:19 -0700 (PDT) Date: Fri, 20 Aug 2004 10:36:19 -0700 (PDT) From: Doug White To: "Gustavo A. Baratto" In-Reply-To: <099201c48665$5da6ae00$6400a8c0@chivas> Message-ID: <20040820103016.P73388@carver.gumbysoft.com> References: <087b01c48635$d3ebc850$6400a8c0@chivas> <20040819191709.Q66276@carver.gumbysoft.com> <099201c48665$5da6ae00$6400a8c0@chivas> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: memory question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 17:36:19 -0000 On Thu, 19 Aug 2004, Gustavo A. Baratto wrote: > > It would be rather lame if libraries were exclusive access. :) There may > > be cases where they do get their own copies. You shouldn't rely on this > > behavior for any sort of memory-use calculations... > > Yes, I think it would be very lame too. But because of the fact you > mentioned about the possibility of one process scribbling on the library > pages, I was not sure the library would be shared between 2 processes in > memory. Mind you that if someone scribbles on the file on disk bad things will happen. :) mmap() allows you to set access permissions on the mapped range, and I think shared libs are mapped read only, so any writes to the area would cause a segfault. I'd have to test that, though. > Is there a rule of thumb for memory use calculations? Don't assume that "shared" pages are actually shared. :) > BTW: is this the correct mailing list for such question? questions@freebsd.org may be more appropriate for queestions about FreeBSD that aren't version-specific, but questions about specifics of implementations can be directed to the appropriate branch list. -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org