From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1bce3f54cf1cba1b X-Google-Attributes: gid103376,public From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) Subject: Re: GNAT Executables: How low can you go? Date: 1996/04/26 Message-ID: <4lqbbd$3t4@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 151751003 references: <4kmq7a$egm@fozzie.sun3.iaf.nl> <4l0o3s$hgt@utrhcs.cs.utwente.nl> <31742475.1CFBAE39@escmail.orl.mmc.com> <4l3h04$6si@linus.mitre.org> <31768D19.446B9B3D@escmail.orl.mmc.com> organization: Comp Sci, RMIT, Melbourne, Australia nntp-posting-user: ok newsgroups: comp.lang.ada Date: 1996-04-26T00:00:00+00:00 List-Id: "Theodore E. Dennison" writes: >Michael F Brenner wrote: >> >> There is no need to justify tiny executables, 140K is a Bloated hello-world. >Its still 140K, just in two different files. Wrong. Suppose the library is 120 k and the application, minus library, is 20k. - static linking: you get 140k in your program AND YOU STILL HAVE THE LIBRARY so you have one 120k file and one 140k file - dynamic linking you have one one 120k file and one 20k file. The model I have here is someone developing on a UNIX box; I can't throw away the original copy of the (statically linked) library just because I have compiled one program! Come to think of it, the same is true with DOS compilers: just because I've compiled one program doesn't mean I can throw the library away. 1. Development time. Dynamic linking saves space _even with only one program_. (In this example, 140k -vs- 260k.) 2. Shipping. Any dynamic library that doesn't come standard with the operating system has to be shipped with the program that uses it. Shipping the DLL with the EXE may take _more_ space than shipping the statically linked version, because the DLL includes things that this particular EXE may not need. However, if the shipping package includes several applications using the same DLL, only one copy is needed, and it's really quite common to have several applications in one package. (DOS example: command line compiler, IDE compiler, linker.) 3. Installation. The user only has to install *one* copy of the DLL; the installation process has to recognise whether the DLL has already been installed. 4. Run time. The DLL will be loaded only once no matter how many applications are using it (UNIX "shared" libraries), and may, depending on the operating system, be kept around for a little while after the last application using it has quit so that it doesn't need reloading (like the old UNIX "save text" bit). -- Abigail Ruth, born 8 April 1996, 7lbs, wonderful! Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.