Ada Programming/Attributes/'Simple Storage Pool

Description
For every nonformal, nonderived access-to-object type, the representation attribute   may be specified via an attribute_definition_clause (or by specifying the equivalent aspect): The name given in an attribute_definition_clause for the   attribute shall denote a variable of a ‘simple storage pool type’ (see pragma ).

The use of this attribute is only allowed for a prefix denoting a type for which it has been specified. The type of the attribute is the type of the variable specified as the simple storage pool of the access type, and the attribute denotes that variable.

It is illegal to specify both  and   for the same access type.

If the  attribute has been specified for an access type, then applying the   attribute to the type is flagged with a warning and its evaluation raises the exception.

If the Simple_Storage_Pool attribute has been specified for an access type, then the evaluation of the attribute   returns the result of calling  , which is intended to indicate the number of storage elements reserved for the simple storage pool. If the Storage_Size function has not been defined for the simple storage pool type, then this attribute returns zero.

If an access type  has a specified simple storage pool of type , then the evaluation of an allocator for that access type calls the primitive   procedure for type  , passing   as the pool parameter. The detailed semantics of such allocators is the same as those defined for allocators in section 13.11 of the, with the term simple storage pool substituted for storage pool.

If an access type  has a specified simple storage pool of type , then a call to an instance of the   for that access type invokes the primitive   procedure for type  , passing   as the pool parameter. The detailed semantics of such unchecked deallocations is the same as defined in section 13.11.2 of the Ada Reference Manual, except that the term simple storage pool is substituted for storage pool.