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,7b69a8818c20ab9f X-Google-Attributes: gid103376,public From: "Thierry Lelegard" Subject: Re: Y21C Bug Date: 2000/01/12 Message-ID: <85irp9$11m$1@front3.grolier.fr>#1/1 X-Deja-AN: 571809478 Content-Transfer-Encoding: 7bit References: <84nqbo$q28$1@nnrp1.deja.com> <84o0g2$u8v$1@nnrp1.deja.com> <84pvrs$7q1@ftp.kvaerner.com> <84sltt$7s3@ftp.kvaerner.com> <84t966$be0$1@nnrp1.deja.com> <84vev2$7p4@ftp.kvaerner.com> <38737352.B282CC2@easystreet.com> <851j2q$78q1@ftp.kvaerner.com> <852dt0$vdl$1@nnrp1.deja.com> <87iu16yxv4.fsf@deneb.cygnus.argh.org> <387B0AC9.AA4E090B@mail.com> <387BC729.9F02FEF1@mail.com> X-Priority: 3 Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 X-Trace: front3.grolier.fr 947712617 1078 213.44.28.44 (12 Jan 2000 21:30:17 GMT) Organization: Club-Internet (France) X-MSMail-Priority: Normal Mime-Version: 1.0 NNTP-Posting-Date: 12 Jan 2000 21:30:17 GMT Newsgroups: comp.lang.ada Date: 2000-01-12T21:30:17+00:00 List-Id: > > I think on DEC Ada on VAX/VMS, the executable file would *not* contain > > all those zeros -- just an indication that the OS should create them as > > zero if and when necessary. (Assuming One_Zillion is made small enough > > that the compiler doesn't blow up.) > > I think it does, even it they are all zeros. I ran in that problem a few times. Yes it does. If you had left the variable uninitialized (on an Ada perspective), then the variable would have been allocated in a "demand zero" section (no allocation in executable). Since you provided an explicit initial value, the compiler/linker placed it into a "copy on reference" section which contains the initial values. Of course, the compiler could make a special optimization which consists in inspecting every single byte of this initial value and if they are all zeroes then place the variable into a "demand zero" section. But, it appears that this optimization is not made. By the way, for some obscure reasons I used to know (but that I forgot), the VMS linker never creates "demand zero" sections in shareable images ("DLL" for users of dummy OS). They are turned into "copy on reference" sections filled with zeroes. "Demand zero" sections apply to executable images only. -Thierry ________________________________________________________ Thierry Lelegard, Paris, France E-mail: lelegard@club-internet.fr