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,cb76a6210612334 X-Google-Attributes: gid103376,public From: "Bobby D. Bryant" Subject: Re: Bounded strings yield huge object files. Date: 1997/08/28 Message-ID: <34051CFD.5338F33D@mail.utexas.edu>#1/1 X-Deja-AN: 268720906 References: <3403D2AB.81E37D9C@mail.utexas.edu> To: Robert Dewar X-Priority: 3 (Normal) Organization: The University of Texas at Austin Newsgroups: comp.lang.ada Date: 1997-08-28T00:00:00+00:00 List-Id: N.B. -- the following takes place in the context of GNAT 3.09 under Red Hat LINUX 4.2. Robert Dewar wrote: > Bobby says > > < > 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