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,364dfbdf0a113a56 X-Google-Attributes: gid103376,public From: geert@gonzo.sun3.iaf.nl (Geert Bosch) Subject: Re: Looking for a smart linker for GNAT/DOS Date: 1997/04/19 Message-ID: <5jac72$atr$1@gonzo.sun3.iaf.nl>#1/1 X-Deja-AN: 236418503 References: <1997Apr15.202909.5879@news> <1997Apr16.162852.5886@news> Organization: La Calandre Infortunee Newsgroups: comp.lang.ada Date: 1997-04-19T00:00:00+00:00 List-Id: Robert Dewar (dewar@merv.cs.nyu.edu) wrote: One thing that can help is the systematic use of DLL's or whatever shared libraries are called on your machine. Since only what you actually use is loaded into physical memory, and since your image then does not contain the code, the problem is largely alleviated. Actually, this only increases the importance of smart linkers or compilers. In the example below I will assume a system with 4 kB VM pages loaded on demand. Consider a program using a library of 50 subprograms of 500 bytes in size on average. When the program uses only 6 of the subprograms in the package, chances are that these 6 subprograms are all in different VM pages, so using these 6 subprograms will cause nearly the entire library to be loaded. When statically linking in only the functions that are actually used, they all fit in a single VM page reducing the working set and improving locality of reference. Since compilers know a lot about the calling graph of a library or program they should arrange the code in such a way that VM pages are used in a smart way. Regards, Geert