comp.lang.ada
 help / color / mirror / Atom feed
* Re: Bounded strings yield huge object files.
       [not found] <3403D2AB.81E37D9C@mail.utexas.edu>
@ 1997-08-27  0:00 ` Robert Dewar
  1997-08-28  0:00   ` Bobby D. Bryant
  1997-08-27  0:00 ` Robert Dewar
  1 sibling, 1 reply; 3+ messages in thread
From: Robert Dewar @ 1997-08-27  0:00 UTC (permalink / raw)



Bobby says

<<Per the appended example, whenever I instantiate a bounded string my
object file grows by about 140Kbytes.  This holds whether the
instantiation is done within a program or as a separate compilation
unit.  (I find that separately compiled instantiations vary in size by a
few thousand bytes depending on the bound that is specified, but those
sizes that I've tried are all in the 140-150K range.)
>>

Sounds about reasonable for the code of bounded strings with debugging
information included -- of course the majority of this space is the
debugging information, but you must want it if you are generating it 
(unless you are simply blissfully unaware :-) :-)





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bounded strings yield huge object files.
       [not found] <3403D2AB.81E37D9C@mail.utexas.edu>
  1997-08-27  0:00 ` Bounded strings yield huge object files Robert Dewar
@ 1997-08-27  0:00 ` Robert Dewar
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Dewar @ 1997-08-27  0:00 UTC (permalink / raw)



Bobby says

<<Are the above simply features of this implementation that I'll have to
deal with, or is there some trick I need to know about?  (Does the logic
for handling bounded strings really require so much object space?)

Admittedly, minimizing code size is not part of my prime directive, but
I find this quite surprising and even a bit alarming, so I would
appreciate any comments anyone cares to make on it.>>


From this it does sound as though you are confusing size of the object
file with size of the executable program -- quite a significant
confusion. Strip the symbols out if you do not need them!





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bounded strings yield huge object files.
  1997-08-27  0:00 ` Bounded strings yield huge object files Robert Dewar
@ 1997-08-28  0:00   ` Bobby D. Bryant
  0 siblings, 0 replies; 3+ messages in thread
From: Bobby D. Bryant @ 1997-08-28  0:00 UTC (permalink / raw)
  To: Robert Dewar


N.B. -- the following takes place in the context of GNAT 3.09 under Red
Hat LINUX 4.2.


Robert Dewar wrote:

> Bobby says
>
> <<Per the appended example, whenever I instantiate a bounded string my
>
> object file grows by about 140Kbytes.  This holds whether the
> instantiation is done within a program or as a separate compilation
> unit.  (I find that separately compiled instantiations vary in size by
> a
> few thousand bytes depending on the bound that is specified, but those
>
> sizes that I've tried are all in the 140-150K range.)
> >>
>
> Sounds about reasonable for the code of bounded strings with debugging
>
> information included -- of course the majority of this space is the
> debugging information, but you must want it if you are generating it
> (unless you are simply blissfully unaware :-) :-)

Thank you, Robert, for your responses.

While "blissfully unaware" is probably a good description of my relation
to GNAT, Ada, and LINUX all three, I'm not quite convinced that debug
info is the problem.  After reading your posts I read up on compiling
for debugging under GNAT, recompiled with   % gnatmake -f -g test_2   to
enforce recompilation with debug info, and found that the object file
for the previously mentioned string_80.ads grew from 141708Kb to a
whopping 225924Kb (and, of course, all the other recompiled units'
object files grew as well).  Since it grew so much with the -g switch,
I'm fairly confidant that the original file was sans debug info.

Also, regarding your second post, I may need to clarify that the
(non-debug) object file sizes carry over directly to the executable
(that is, an executable program using my string_80 instantiation of the
bounded string stuff is c. 140Kb larger than the same program using
fixed-length strings), so it's not just symbol-table information needed
for consistency checking and linking.

As I say, this isn't killing me, but any further comments (from you or
anyone else) would be appreciated.

Bobby D. Bryant
The University of Texas at Austin







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-08-28  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3403D2AB.81E37D9C@mail.utexas.edu>
1997-08-27  0:00 ` Bounded strings yield huge object files Robert Dewar
1997-08-28  0:00   ` Bobby D. Bryant
1997-08-27  0:00 ` Robert Dewar

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