Re: [wmii] patches for shared object libixp and Sun compiler

From: Anselm R. Garbe <>
Date: Mon, 15 Jan 2007 14:41:00 +0100

On Mon, Jan 15, 2007 at 01:07:37PM +0100, Uriel wrote:
> >Please stop these non-constructive complaints. Dynamic
> >linking is about reducing memory-usage by avoiding to have
> >the same code in memory several times by several programs.
> >So it's useful, just as much as you use libraries at all
> >in order not to write and compile the same code over and
> >over again (and thus would be a waste of resources).
> >And don't tell me today's computers have enough memory...
> >that's ignorant.

Actually that is an argument which is repeated quite often, but
it hasn't been the real intention of dynamic linking. Dynamic
linking has been originally invented to replace code being
executed during runtime. There was some need back in the 70s
to achieve this in the financial sector, where specific
processes on mainframes could not be stopped for various
reasons, but laws and calculation methods changed during the
runtime of such processes, hence the idea was to replace such
methods by updating libraries.

The argument you describe is more a side-effect of software
getting bloaty more and more. Considered you refer to a fully
blown desktop environment like KDE or Gnome, I believe that a
desktop system would consume 2-5 times more memory without
dynamic linking. But in general the difference in memory
consumption seems negligible once if you compare
statically-linked userlands to dynamically-linked userlands.

The comparision Uriel proposed is quite fair in my eyes. Check
out the memory consumption of a fully blown Plan 9 server with a
X-less Linux server (the Plan 9 system with ftp, http, etc.
services enabled and maybe exporting huge amounts of data using
9p servers).

Another comparision is: Just check out the binary size of
completely statically linked binaries against fefe's dietlibc or
uClibc and compare that to the sizes of the same source code
being dynamically linked against GNU libc (or the commercial
counterparts from Sun). I believe you will be surprised.

Also consider busybox as a good counterpart example for the
pro-argument of dynamic linking.

(There's another good argument for static linking - try to run a
dynamically linked ELF-binary from 2001 under todays Linux
distributions, I bet you won't be very successful - but I can
still run a statically linked a.out binary from 1991 on my
bleeding edge Ubuntu box).


 Anselm R. Garbe >< >< GPG key: 0D73F361
Received on Mon Jan 15 2007 - 14:41:00 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:18:33 UTC