Mail Archives: djgpp/1999/06/09/12:09:24
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 -