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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,364dfbdf0a113a56 X-Google-Attributes: gid103376,public From: Gautier.DeMontmollin@maths.unine.ch (Gautier) Subject: Re: Looking for a smart linker for GNAT/DOS Date: 1997/04/21 Message-ID: <1997Apr21.105404.5917@news>#1/1 X-Deja-AN: 236310583 References: <1997Apr15.202909.5879@news> Organization: University of Neuchatel, Switzerland Reply-To: Gautier.deMontmollin@Maths.UniNe.CH Newsgroups: comp.lang.ada Date: 1997-04-21T00:00:00+00:00 List-Id: > I'm thinking about the LAPACK library in FORTRAN, too: in many real projects, > only a few from the thousends LAPACK routines are used. > A GNAT/DOS implementation of it would produce executables of >20 megas > (and certainly just wouldn't run on most machines), > although they should be of a few hundreds of K if linked by a good linker! > > You are confusing virtual and physical memory here. Just because an > EXE is large does not mean that you needs lots of physical memory in > your working set to run the program, so you are probably quite wrong > about it not running on most machines. I meant running at a reasonable speed, too. If your computation takes 100 days instead of 1 because of waste of memory (=> need of virtual memory), oooch! (...) > There are two solutions (besides a smart linker). The first is to > structure the interface as a set of separate Ada 95 child units, > rather than one monolithic spec. After all the original Fortran > routines are separate units, and a Fortran program using LAPACK > works fine even without a smart linker. That's true, but if you have to mention explicitly all the part of LAPACK you are using, you won't convince any Fortran programmer to change... (Do you know Modula-2, where the ``importation'' part is as long as the programmes themselves ?) > > The second is to put the interface in a DLL, as described above. > These days, that is getting to be a more and more attractive > solution, and it may well be that this is the way to go, since > it is more convenient for the Ada programmer than splitting the > interface into separate units. Good idea if no better solution. > > This is not to say that a smart linker would not be useful, just that > with modern systems, the need for smart linkers is less than it used > to be, which makes it even less likely that you will find such beasts > around. Alas... G.