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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Changing SS_Pool Date: Thu, 17 Nov 2016 09:20:56 +0000 Organization: A noiseless patient Spider Message-ID: References: <22d398f6-0b5a-4719-a695-8dd9b7de24b0@googlegroups.com> <8756f78b-90d1-4607-83d7-62ebad2ca78c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="7f60b12c9099701a0713772d1b96433c"; logging-data="28593"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++M8r/sOrDy6AkyOo5xroR8jQ4DY3FRME=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:vNSoZEx6A8+VU4p1L7UoNfaQXSE= sha1:2sxIyth58Ats2RiBs2YZ3F3zvK0= Xref: news.eternal-september.org comp.lang.ada:32361 Date: 2016-11-17T09:20:56+00:00 List-Id: 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.