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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,41f54053ba96c4cb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-22 02:30:00 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-was.dfn.de!news-koe1.dfn.de!do.de.uu.net!businessnews.de.uu.net!not-for-mail Message-ID: <3B331017.5F34A904@CCI.Sema.de> Date: Fri, 22 Jun 2001 11:29:59 +0200 From: Vincent Smeets Organization: CCI GmbH X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.6 sun4m) X-Accept-Language: nl, en, de MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Data Elaboration References: <3b321d2f$1@pull.gecm.com> <3B327146.C1B43717@boeing.com> <3B32DFEB.1786FEE5@CCI.Sema.de> <3b32efb0$1@pull.gecm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 193.103.165.100 X-Trace: 993202200 businessnews.de.uu.net 14093 193.103.165.100 X-Complaints-To: abuse@de.uu.net Xref: archiver1.google.com comp.lang.ada:9025 Date: 2001-06-22T11:29:59+02:00 List-Id: Martin Dowie wrote: > > Ok then, here's part 2 of the question! Given that they > will be elaborated in order (I was looking at section 3.3.1 > not 3.11 :-(. If I change that to - > > with My_Allocator; > > package Blah is > > Bool1 : Boolean; -- always elaborates first > pragma Import (Ada, Bool1); > pragma Volatile (Bool1); > for Bool1'Address use My_Allocator (Bool1'Size); > > Bool2 : Boolean; -- always elaborates second > pragma Import (Ada, Bool2); > pragma Volatile (Bool2); > for Bool2'Address use My_Allocator (Bool2'Size); > > Int1 : Integer; -- always elaborates third > pragma Import (Ada, Int1); > pragma Volatile (Int1); > for Int'Address use My_Allocator (Int1'Size); > > end Blah; > > where My_Allocator assigns memory space from a particular > start address, my objects will always elaborate to the > same locations, yes? (My_Allocator containing a protect > object to ensure sequential calculation of the addresses). I would say (I'm not 100% sure) that the order of elaboration of Bool1, Bool2 and Int1 will be the same. This does not mean that they always will use the same memory. In case you have an other package with the same allocation-construct, you can't directly predickt the order of elaboration of packages. You can do some tuning with "pargma Elaborate". By the way. You will need a pragma Elaborate (My_Allocator); for this package. Vincent -- Vincent Smeets Competence Center Informatik GmbH -- Tel. : +49-5931-805461 Postfach 1225 -- Fax : +49-5931-805175 49702 Meppen, Germany -- mailto:Vincent.Smeets@CCI.Sema.de http://www.CCI.de/ -- PGP fingerprint: E2437E38AAA9CA7D A31E7D751F1B6454 8AED7B76