delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/09/12:09:24

Sender: root AT delorie DOT com
Message-ID: <375E93A0.B3795B83@inti.gov.ar>
Date: Wed, 09 Jun 1999 13:17:36 -0300
From: salvador <salvador AT inti DOT gov DOT ar>
Organization: INTI
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: es-AR, en, es
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Hello World and File size
References: <8D53104ECD0CD211AF4000A0C9D60AE30141E446 AT probe-2 DOT acclaim-euro DOT net>
Reply-To: djgpp AT delorie DOT com

Shawn Hargreaves wrote:

> The other question is of runtime efficiency. Similar issues apply
> here to with the executable size: if you only have one program
> in use at a time, the DLL approach wastes memory. Since DOS is
> a single-tasking system, dynamic linking won't provide much
> benefit here. The big win is in cases like a recursive make,
> if you could have make, gcc, cc1, cpp, etc, all sharing a single
> runtime, but that needs serious support from the OS. Windows
> can share a single copy of the DLL code between multiple programs,
> and Linux goes even further by doing copy-on-write, which allows
> you to share readonly data as well, but this sort of thing would
> be an absolute nightmare to implement from inside a DOS program
> (I'm not even sure whether DPMI is flexible enough for it to
> even be possible).

Also on the topic: dynamic linking is *very* inefficient for small
library functions. And to make it worst: the -fPIC option needed for it
uses a register for the dynamic library jump table, losing one register
in x86 is a big cost. Even worst, the code must be done to be executed
at any address, it adds more code. So a Linux dynamic executable is
slower than a static one, of course the save in memory makes it better
than using a lot of static programs, but in DOS in doesn't have the same
result.

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
                    set AT ieee DOT org set-soft AT bigfoot DOT com
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019