Date: Fri, 20 Aug 2004 10:36:19 -0700 (PDT) From: Doug White <dwhite@gumbysoft.com> To: "Gustavo A. Baratto" <gbaratto@superb.net> Cc: freebsd-current@freebsd.org Subject: Re: memory question Message-ID: <20040820103016.P73388@carver.gumbysoft.com> In-Reply-To: <099201c48665$5da6ae00$6400a8c0@chivas> References: <087b01c48635$d3ebc850$6400a8c0@chivas> <20040819191709.Q66276@carver.gumbysoft.com> <099201c48665$5da6ae00$6400a8c0@chivas>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040820103016.P73388>