Date: Tue, 14 Aug 2007 15:07:12 -0700 From: "David Schwartz" <davids@webmaster.com> To: <freebsd-stable@FreeBSD.ORG> Subject: RE: Static linking and memory usage Message-ID: <MDEHLPKNGKAHNMBLJOLKAEKHGCAC.davids@webmaster.com> In-Reply-To: <E1IKxQG-0001oe-3M@dilbert.ticketswitch.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> If I have an executable which is staticly linked with many copies > of it running (a CGI script in fact), will all those copies share > the text segment of the executable on the disc, or will it actually > use up real memory resource with many copies of the executable ? I > have been assuming the former, but possibly that is not correct. As is the case for all files, if the contents are not modified, the physical memory is shared. Two or more processes can map the same page of the same file and will get the same physical page of memory, normally marked unshare/copy-on-write. DS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?MDEHLPKNGKAHNMBLJOLKAEKHGCAC.davids>