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,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ADA Popularity Discussion Request Date: 22 Sep 2004 21:51:38 +0100 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <49dc98cf.0408110556.18ae7df@posting.google.com> <17sx057ro5jw5$.t2qlaeoxg611$.dlg@40tude.net> <1095082522.132276@master.nyc.kbcfp.com> <18ym85v67zof3$.7oqswzjfgswr.dlg@40tude.net> <1095090665.624419@master.nyc.kbcfp.com> <68zmgy3b894u.rs67cy6jjfiq$.dlg@40tude.net> <1164383.Vq7EPUUJyU@linux1.krischik.com> <2177491.OlAk1RxoCA@linux1.krischik.com> <1434159.hBAPArD9Aj@linux1.krischik.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1095886659 4419 62.49.19.209 (22 Sep 2004 20:57:39 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 22 Sep 2004 20:57:39 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: g2news1.google.com comp.lang.ada:3960 Date: 2004-09-22T21:51:38+01:00 List-Id: Martin Krischik writes: > See 13.11(24): > > 24. A default (implementation-provided) storage pool for an > access-to-constant type should not have overhead to support > deallocation of individual objects. I am always moaning at requirements that specify a mechanism rather than an intention. I don't see why the fact that a type is access-to-constant should eliminate the need for deallocation. There is clearly a difference between P : Constant_String_Access := new String'("p"); and Q : constant Constant_String_Access := new String'("q"); (well, to me anyway). The AARM says 24.a Ramification: Unchecked_Deallocation is not defined for such types. If the access-to-constant type is library-level, then no deallocation (other than at partition completion) will ever be necessary, so if the size needed by an allocator of the type is known at link-time, then the allocation should be performed statically. If, in addition, the initial value of the designated object is known at compile time, the object can be allocated to read-only memory. so the allocation part is there if you look, and that's the major part here. -- Simon Wright 100% Ada, no bugs.