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-Thread: 103376,ed3a51e96a1c868b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feedme.ziplink.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Using local storage pools... Date: Wed, 23 Feb 2011 21:01:51 +0000 Organization: A noiseless patient Spider Message-ID: References: <7elam6trrv39c3p9iop4fiduqa1jrat4r4@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx03.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="2552"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Fj7rLNK7fYAEsnbl8JTvg9eoY08Lfkq8=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:12Chx0UVmZnQOsW18yVrELRyYlM= sha1:j8cZsYfTgNemxeui2gWAqnRSSSc= Xref: g2news1.google.com comp.lang.ada:17565 Date: 2011-02-23T21:01:51+00:00 List-Id: Brian Drummond writes: > The question(or four) for now is ... should the following really raise > Storage_Error, i.e. am I doing something silly, and if so, what? Or > is this a bug in Gnat? Looks to me like a bug in GNAT. I expect it's not been found before because the point of this pool type is that you *don't* deallocate, but leave it up to finalization! I'm not quite clear how we can use this pool in the binary-trees benchmark, since the rules say you create a class to represent the tree, which must include the access types, and the storage pool needs to exist before the access types are used. Perhaps a generic? Even then, why not just declare an access type in the appropriate scope and let the compiler figure out how to deallocate storage on scope exit? (in other words, I don't see why GNAT includes System.Pool_Local in the first place). Oh, perhaps it's so that you can actually create such a generic?