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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.13.250.129 with SMTP id k123mr1215748ywf.39.1479391398134; Thu, 17 Nov 2016 06:03:18 -0800 (PST) X-Received: by 10.157.20.197 with SMTP id r5mr222963otr.9.1479391398094; Thu, 17 Nov 2016 06:03:18 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!1.eu.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!n6no313960qtd.0!news-out.google.com!c26ni1688itd.0!nntp.google.com!o1no472538ito.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 17 Nov 2016 06:03:17 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=90.202.61.209; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 90.202.61.209 References: <22d398f6-0b5a-4719-a695-8dd9b7de24b0@googlegroups.com> <8756f78b-90d1-4607-83d7-62ebad2ca78c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Changing SS_Pool From: Lucretia Injection-Date: Thu, 17 Nov 2016 14:03:18 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:32362 Date: 2016-11-17T06:03:17-08:00 List-Id: On Thursday, 17 November 2016 09:20:56 UTC, Simon Wright wrote: > Lucretia writes: > > > On Wednesday, 16 November 2016 22:11:49 UTC, Lucretia wrote: > >> Hi, > >> > >> Is it possible to make SS_Pool be an array of storage_elements > >> instead of just an integer? Seems pointless creating a separate > >> array and having that random integer just because the compiler > >> expects it. > > > > It seems to work, but whether it's legal or not, I'm not so sure. > > The declaration is > > private > SS_Pool : Integer; > -- Unused entity that is just present to ease the sharing of the pool > -- mechanism for specific allocation/deallocation in the compiler > > which I think means either that in a full RTS the ompiler has to do > stuff which it doesn't in a restricted RTS, or that it's a fossil from > some previous design. > > I just looked into (a) a build using GNAT GPL 2016, (b) a build using > one of my cortex-gnat-rts runtimes. In (a), ss_pool occupies 4 bytes, in > (b) it's in a discarded input section. Both RTSs are compiled with > -ffunction-sections -fdata-sections, the difference is that in (b) my > project GPR explicity has those two switches in package Builder, and > -Wl,-gc-sections in package Linker. I wonder whether they should be in > the RTS's runtime.xml, so as to be used everywhere? Will ask AdaCore. It doesn't seem to be having an adverse effect being an array.