comp.lang.ada
 help / color / mirror / Atom feed
From: geert@gonzo.sun3.iaf.nl (Geert Bosch)
Subject: Re: Looking for a smart linker for GNAT/DOS
Date: 1997/04/19
Date: 1997-04-19T00:00:00+00:00	[thread overview]
Message-ID: <5jac72$atr$1@gonzo.sun3.iaf.nl> (raw)
In-Reply-To: dewar.861372455@merv


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





  reply	other threads:[~1997-04-19  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1997Apr15.202909.5879@news>
1997-04-16  0:00 ` Looking for a smart linker for GNAT/DOS Samuel Tardieu
1997-04-16  0:00   ` Gautier
1997-04-18  0:00     ` Robert Dewar
1997-04-19  0:00       ` Geert Bosch [this message]
1997-04-22  0:00         ` Robert Dewar
1997-04-28  0:00         ` Larry Kilgallen
1997-04-19  0:00       ` Fergus Henderson
1997-04-21  0:00         ` Robert Dewar
1997-04-21  0:00           ` Gautier
1997-04-23  0:00             ` Robert Dewar
1997-04-24  0:00               ` Gautier
1997-04-26  0:00                 ` Robert Dewar
1997-04-27  0:00                 ` Geert Bosch
1997-04-29  0:00                   ` Gautier
1997-04-21  0:00       ` Mats Weber
1997-04-23  0:00         ` Robert Dewar
1997-04-21  0:00       ` Gautier
     [not found] ` <dewar.861173085@merv>
1997-04-17  0:00   ` Gautier
1997-04-17  0:00     ` Robert Dewar
1997-04-18  0:00       ` Gautier
1997-04-19  0:00         ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox