comp.lang.ada
 help / color / mirror / Atom feed
* Questions on Storage Pools
@ 2013-08-10 21:45 AdaMagica
  2013-08-12 17:14 ` Adam Beneschan
  0 siblings, 1 reply; 6+ messages in thread
From: AdaMagica @ 2013-08-10 21:45 UTC (permalink / raw)


This is a question to language lawyers.

First two citations:

RM 13.11(18) If Storage_Size is specified for an access type, then the Storage_Size of this pool is at least that requested, and the storage for the pool is reclaimed when the master containing the declaration of the access type is left.

RM 7.6.1(11.1/3) Each nonderived access type T has an associated *collection*, which is the set of objects created by allocators of T ... Finalization of a collection consists of finalization of each object in the collection, in an arbitrary order. The collection of an access type is an object implicitly declared at the following place:
(11.2/3) For a named access type, the first freezing point (see 13.14) of the type.

So, IIUC 7.6.1, if the master of an access type is left, all still existing objects in the collection are finalized. (Note that these paragraphs and the definition of *collection* are new in Ada 2012.)
However 13.11 seems to say that this is the case only for access types with Storage_Size defined.

Further: If several access types use the same (user defined) storage pool, and the master of one of them is left (i.e. this access type has a deeper access level than the others and also deeper than the storage pool itself), is then the associated collection (i.e. a part of all objects allocated in the storage pool) finalized?
In other words: Is the collection of an access type with a defined storage pool part of this pool and finalized separately?

I would be very thankful for clarification.
C. Grein

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-14  7:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-10 21:45 Questions on Storage Pools AdaMagica
2013-08-12 17:14 ` Adam Beneschan
2013-08-13 19:36   ` AdaMagica
2013-08-13 20:21     ` Adam Beneschan
2013-08-13 21:02       ` Randy Brukardt
2013-08-14  7:40         ` AdaMagica

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