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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ed6a891101ff4e06 X-Google-Attributes: gid103376,public From: Richard D Riehle Subject: Re: Freeing Pointers to classwide types Date: 1998/09/28 Message-ID: <6uojcq$bp2@sjx-ixn3.ix.netcom.com>#1/1 X-Deja-AN: 395696927 References: <1ftmFTC69GA.191@samson.airnet.net> <360b26a1.41575272@SantaClara01.news.InterNex.Net> <6ugeu2$79u$1@nnrp1.dejanews.com> <360c4a70.29707515@SantaClara01.news.InterNex.Net> <6uifpt$e98$1@nnrp1.dejanews.com> <360d1380.165146@SantaClara01.news.InterNex.Net> <6ulj29$ne3$1@nnrp1.dejanews.com> <360e790d.241368@SantaClara01.news.InterNex.Net> <6umkl8$qbm$1@nnrp1.dejanews.com> <360f143c.39974468@SantaClara01.news.InterNex.Net> <6uo83j$dv2$1@nnrp1.dejanews.com> Organization: ICGNetcom X-NETCOM-Date: Mon Sep 28 11:09:30 AM PDT 1998 Newsgroups: comp.lang.ada Date: 1998-09-28T11:09:30-07:00 List-Id: In article <6uo83j$dv2$1@nnrp1.dejanews.com>, dewarr@my-dejanews.com wrote: In reply to a question from Tom Moran about System.Storage_Pools (ALRM 13.11), >You really should look at the Storage_Pools facility. You seem to be declaring >that you are sure it is not a modest change, but then ask questions that >suggest you are not quite sure what such a change would involve. In the case >of GNAT, it is just a matter of adding a single representation clause for the >type, not a big burden. I checked the GNAT documentation. Am I missing something, I wonder? Does GNAT already include an overloading of the subprograms in System.Storage_Pool. If so, Robert's assertion that "it is just a matter of adding a single representation clause" might be sufficient. Otherwise, it is a bit misleading in its suggestion of simplicity. The representation clause is only a small part of the requirement for using the abstract class package System.Storage_Pools. One must also overload the Allocate and Deallocate procedures. In fact, to make this package really useful, one must also overload the initialize and finalize procedures from Ada.Finalization. There are very few examples in the literature for using System.Storage_Pools. At several Ada conferences I asked prominent technical experts if they could point me to some references where someone had actually implemented an overloading of System.Storage_Pools. None of those I asked were forthcoming. The example in the Rationale falls into the category of "seduced and abandoned." More recently, John Barnes, dependable Ada stalwart, included an excellent example in the Second Edition of his book, Programming in Ada 95. It is fully coded, readable, and enlightening. However, it is clear from studying the Barnes example that System.Storage_Pools is, in practice, a non-trivial issue. Richard Riehle richard@adaworks.com http://www.adaworks.com