From: Bill James <bill@lsl.co.uk>
Subject: Re: Linker virtual size
Date: 1998/09/18 [thread overview]
Message-ID: <36028475.ABD@lsl.co.uk> (raw)
In-Reply-To: 35FEB41B.EE58A65A@brighttiger.com
Jeff Denham wrote:
>
> Joe Mario wrote:
>
> > Bill James wrote:
> > > I guess lots/all of us suffer from this - we customarily get VS over
> > > 300Mb and sometimes 400Mb while linking our 35Mb executable. 128Mb
> > > machine unusable during this period.
> > >
> > > Why is it so big???
> >
> > The amount of memory used by ld during a link is primarily a function of
> > the
> > number and size of the input objects and the number of external
> > symbols in those objects. Other things come into play but to a smaller
> > degree. The resultant size of the executable says nothing about what
> > the linker was dealing with for inputs.
>
> In other words, ld is essentially mmap()-ing the whole
> shooting match -- .o's and referenced .a and .so --
> into its address space. This makes it much more efficient
> in terms of its I/O behavior, but as you're seen, can
> result in a huge VM footprint.
>
I've noticed that it is tolerant of running out of swap space - you
get messages saying 'cannot allocate requested swap' or some such. I
guess that it starts dealing in I/O when that happens - perhaps I
can constrain it using 'limit'... no, just tried limit addressspace
and it died horribly... think again...
Bill
--
Bill James (mailto:bill@lsl.co.uk) Laser-Scan Ltd,
Systems Development Manager Science Park, Milton Rd,
Tel: 01223 420414 Fax: 01223 420044 Cambridge, CB4 4FY, UK.
= Any opinions expressed are mine and not necessarily Laser-Scan's =
prev parent reply other threads:[~1998-09-18 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-15 4:00 Linker virtual size Bill James
1998-09-15 4:00 ` Joe Mario
1998-09-15 4:00 ` Jeff Denham
1998-09-18 4:00 ` Bill James [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox