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,b1ebfe7f8f5e385d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-05 10:34:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Generic formal access types Date: 05 May 2003 13:34:31 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <3eb23fca$1@epflnews.epfl.ch> <1ec946d1.0305050840.4a1ffd48@posting.google.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1052156071 29625 199.172.62.241 (5 May 2003 17:34:31 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 5 May 2003 17:34:31 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:36978 Date: 2003-05-05T13:34:31-04:00 List-Id: mheaney@on2.com (Matthew Heaney) writes: > I think a bigger problem is that the declared pointer type doesn't > turn off the storage pool. If the designated type is T'Class, doesn't > this drag a lot of extra run-time baggage? I don't remember what Address_To_Access_Conversions says about pools, and I'm too lazy to look it up. Probably nothing. In general, an access-to-T'Class type needs to worry about finalization, because even if T has no finalization, some extension might. I don't think that introduces any overhead in the conversions, but a class-wide allocator would have to check (probably at run time) whether the actual type has any finalization, and if so, hook the object into some list of to-be-finalized objects. Did you have anything else in mind? In my current project, we care a lot about storage management, so we have a coding convention: *Every* access type must have "for T'Storage_Pool use..." to indicate which pool, or "for T'Storage_Size use 0;" to indicate that there are no allocators for that type, or a comment saying why we're violating this rule. - Bob