From owner-freebsd-hackers Wed Aug 27 22:07:53 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA08172 for hackers-outgoing; Wed, 27 Aug 1997 22:07:53 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA08164 for ; Wed, 27 Aug 1997 22:07:48 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.8.6/8.8.5) id AAA07664; Thu, 28 Aug 1997 00:07:31 -0500 (EST) From: "John S. Dyson" Message-Id: <199708280507.AAA07664@dyson.iquest.net> Subject: Re: shared libraries? In-Reply-To: from Alfred Perlstein at "Aug 27, 97 08:16:16 pm" To: perlsta@sunyit.edu (Alfred Perlstein) Date: Thu, 28 Aug 1997 00:07:31 -0500 (EST) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Alfred Perlstein said: > > This is a strange question/idea, > > Why is the standard C library like the code in string.h, stdio.h ect. in > shared libraries? if need be, the programer could change his code and > make a new library. > We do have a shared lib facility. > > If most of the libraries were converted to a shared lib format wouldn't > that reduce memory and disk space requirements tremendously? > not only that, but complile times and exec times would soar, woudn't they? > Believe it or not, shared libs often hurt more than help. Even with an ideal scheme that is prelinked, a program can take MORE memory, not less. We share the .text of programs even without using shared libs. In the case of shells, shared libs are usually a loose. A rule of thumb that I use is (These are only my opinions): App type Shared libc? X applications* YES Shells NO Favorite editors no WWW servers no FTP servers no Sendmail no Build toolchain yes/no Random test pgm YES Other commonly invoked pgms yes Anything in /bin NO Anything in /sbin NO Anything in /usr/bin yes Anything in /usr/sbin no Anything in /usr/libexec no * X applications above can be extended to any package with an extensive library suite. -- John dyson@freebsd.org jdyson@nc.com