From owner-freebsd-hackers Sat Nov 16 21:50:26 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D30337B401 for ; Sat, 16 Nov 2002 21:50:24 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CC6F43E42 for ; Sat, 16 Nov 2002 21:50:24 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.5) with ESMTP id gAH5oOFC036549; Sat, 16 Nov 2002 21:50:24 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.5/Submit) id gAH5oOYt036548; Sat, 16 Nov 2002 21:50:24 -0800 (PST) (envelope-from dillon) Date: Sat, 16 Nov 2002 21:50:24 -0800 (PST) From: Matthew Dillon Message-Id: <200211170550.gAH5oOYt036548@apollo.backplane.com> To: Gary Thorpe Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: cvs commit: src/bin/sleep sleep.c References: <20021117034219.13731.qmail@web41201.mail.yahoo.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :> :> So the difference is 38 pages of memory = 152KB per instance. :> That's fairly significant on a multi-user system that might have :> several hundred csh's running. I specifically compile certain :> non-forked binaries on my system static precisely to reduce their :> memory footprint. : :Remember that those 38 pages may be completely shared in a dynamic :library, leading to memory usage reductions. What is true is that the :startup time for dynamic binaries is most likely slower. No. Those are zero-fill and COW faults. They aren't shared if the program is separately exec'd. A program like sendmail and apache, which fork()'s its children, would be able to share that data. Programs like getty, csh, and sh, which are typically exec'd, cannot share the zero-fill and COW faults. :Other (major?) reasons I have heard in favor of dynamically linking :root: :a. locale support :b. nsswitch.conf support :c. PAM support (maybe this encompasses b.) : :Dynamic linking has been said to be the only way to get locale support :and support for multiple authentication schemes. I don't know if :dynamic linking is absolutely necessary to supports these things from a :technical standpoint, but it would be nice to know (does anyone know?). : :For embedded devices, a single crunchgened binary would probably :smaller anyway e.g. PicoBSD and installation floppies (?). Possibly. I don't know enough about the issue though I don't see why it would be the case. the Dynamic link loader ought to work either way. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message