Date: Thu, 31 Oct 2002 10:37:17 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: Ollivier Robert <roberto@keltia.freenix.fr> Cc: current@FreeBSD.ORG Subject: Re: libc size Message-ID: <3DC1785D.843AFF86@mindspring.com> References: <20021030214158.CB6EA2A88D@canning.wemm.org> <20021030221417.J22480-100000@herring.nlsystems.com> <20021031053202.GA26280@HAL9000.homeunix.com> <20021031080412.GB77041@tara.freenix.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Ollivier Robert wrote: > According to David Schultz: > > Memory is even less of an issue; if a thousand copies of a shell > > are running, their text gets shared regardless of how they are > > linked. > > IIRC not exactly. In the dynamic case, some fixups are done by the dynamic > linker to "link" with the shared libs and that force the pages to be COW'd > thus taking more VM. That's why static binaries are more efficient too. > > (someone who understand these issues please correct me if necessary) There are one or more pages of indirection pointers that will initially point to "fixup" code, so that the first time you indirect through them, they get fixed up and then indirect through to the real code, and subsequent indirects indirect to the real code, rather than the fixup code. The number of pages that end up COW'ed is pretty minimal. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DC1785D.843AFF86>