comp.lang.ada
 help / color / mirror / Atom feed
From: Richard D Riehle <laoxhai@ix.netcom.com>
Subject: Re: Freeing Pointers to classwide types
Date: 1998/09/28
Date: 1998-09-28T11:09:30-07:00	[thread overview]
Message-ID: <6uojcq$bp2@sjx-ixn3.ix.netcom.com> (raw)
In-Reply-To: 6uo83j$dv2$1@nnrp1.dejanews.com

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


 




  reply	other threads:[~1998-09-28  0:00 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-24  0:00 Freeing Pointers to classwide types joecool
1998-09-25  0:00 ` Tom Moran
1998-09-25  0:00   ` Bob Fletcher
1998-09-25  0:00     ` dennison
1998-09-25  0:00     ` Samuel Tardieu
1998-10-09  0:00     ` Matthew Heaney
1998-10-12  0:00       ` Mats Weber
1998-10-12  0:00         ` Pat Rogers
1998-09-25  0:00   ` dewarr
1998-09-25  0:00     ` Tom Moran
1998-09-25  0:00       ` dewarr
1998-09-26  0:00     ` Tom Moran
1998-09-26  0:00       ` dewarr
1998-09-26  0:00         ` Tom Moran
1998-09-27  0:00           ` dewarr
1998-09-27  0:00             ` Tom Moran
1998-09-28  0:00               ` dewarr
1998-09-28  0:00                 ` Tom Moran
1998-09-28  0:00                   ` dewarr
1998-09-28  0:00                     ` Richard D Riehle [this message]
1998-09-28  0:00                       ` Pat Rogers
1998-09-29  0:00                       ` dewarr
1998-09-28  0:00                   ` dewarr
1998-09-28  0:00                     ` Tom Moran
1998-09-28  0:00                       ` Pat Rogers
1998-09-28  0:00                         ` Tom Moran
1998-09-28  0:00                           ` Pat Rogers
1998-09-29  0:00                           ` dewarr
1998-09-29  0:00                             ` Tom Moran
1998-09-30  0:00                               ` Tom Moran
1998-10-01  0:00                                 ` dewar
1998-10-01  0:00                                   ` Tom Moran
1998-10-01  0:00                                     ` dewarr
1998-10-01  0:00                                       ` Tom Moran
1998-10-01  0:00                                     ` Samuel Tardieu
1998-10-01  0:00                                       ` Tom Moran
1998-10-01  0:00                                         ` dennison
1998-10-01  0:00                                         ` Tucker Taft
1998-10-01  0:00                                           ` Tom Moran
1998-10-02  0:00                                           ` dewarr
1998-10-02  0:00                                             ` Larry Kilgallen
1998-10-02  0:00                                               ` dewarr
1998-10-02  0:00                                           ` dennison
1998-10-02  0:00                                             ` dewarr
1998-10-02  0:00                                         ` dewarr
1998-10-09  0:00                                           ` Matthew Heaney
1998-10-09  0:00                                             ` dennison
1998-10-09  0:00                                               ` Matthew Heaney
1998-10-01  0:00                                     ` dewarr
1998-09-28  0:00                       ` Tom Moran
1998-09-28  0:00                         ` Brian Rogoff
1998-10-09  0:00           ` Matthew Heaney
1998-10-09  0:00   ` Matthew Heaney
1998-09-25  0:00 ` alan walkington
1998-09-26  0:00 ` Simon Wright
1998-10-09  0:00 ` Matthew Heaney
1998-10-09  0:00   ` Niklas Holsti
1998-10-10  0:00     ` Matthew Heaney
1998-10-11  0:00       ` Niklas Holsti
1998-10-11  0:00         ` Matthew Heaney
  -- strict thread matches above, loose matches on Subject: below --
1998-09-25  0:00 bpr5549
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox