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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to