Version 1.1 of ai05s/ai05-0190-1.txt

Unformatted version of ai05s/ai05-0190-1.txt version 1.1
Other versions for file ai05s/ai05-0190-1.txt

!standard D.7(8)          09-11-03 AI05-0190-1/01
!class amendment 09-11-03
!status work item 09-11-03
!status received 09-11-03
!priority Low
!difficulty Easy
!subject Restriction No_Allocation_from_Default_Pools
!summary
Provide a restriction that disallows use of allocators for types that use the default storage pool.
!problem
It is common to have a coding convention that only user-defined storage pools be used for all access types. This restriction allows the implementation to enforce this coding convention.
!proposal
(see summary)
!wording
Add after D.7(8):
No_Allocation_From_Default_Pools
Every allocator shall be:
* of a named access type with a Storage_Pool attribute that denotes a user-defined object;
* of an anonymous access type, used to define the value of an access parameter or access discriminant; or
* of an anonymous access type, used in a context where the storage pool is defined to be the same as that of a permitted allocator.
!discussion
We have allowed anonymous allocators so long as they can be allocated on the stack, or in a storage pool that is user-defined. We have not permitted an allocator for an access type with a Storage_Size attribute, because those still involve heap allocation and potentially unchecked deallocation using implementation-specific algorithms.
!example
!ACATS test
An ACATS B test is needed.
!appendix

****************************************************************

Questions? Ask the ACAA Technical Agent