2021-08-23 23:47:29 +00:00
|
|
|
--------------------------------------------------------------------
|
|
|
|
-- Instantantiate this package before using. To allocate integers,
|
|
|
|
--
|
2021-09-30 23:54:50 +00:00
|
|
|
-- P1: aliased System.Pool_Global.Unbounded_No_Reclaim_Pool;
|
2021-08-23 23:47:29 +00:00
|
|
|
-- type Integer_Pointer is access Integer_Pointer;
|
2021-09-30 23:54:50 +00:00
|
|
|
-- package Integer_Pool is new Pool(Integer, Integer_Pointer, P1'Unchecked_Access);
|
2021-08-23 23:47:29 +00:00
|
|
|
-- x: Integer_Pointer;
|
|
|
|
--
|
|
|
|
-- x := Integer_Pool.Allocate(10);
|
|
|
|
--------------------------------------------------------------------
|
|
|
|
|
|
|
|
generic
|
|
|
|
type Normal_Type is limited private;
|
|
|
|
type Pointer_Type is access Normal_Type;
|
|
|
|
Storage_Pool: in Storage_Pool_Pointer := null;
|
|
|
|
|
|
|
|
package H3.Limited_Pool is
|
|
|
|
--pragma Preelaborate (Pool);
|
|
|
|
|
|
|
|
function Allocate (Pool: in Storage_Pool_Pointer := null) return Pointer_Type;
|
|
|
|
|
|
|
|
procedure Deallocate (Target: in out Pointer_Type;
|
|
|
|
Pool: in Storage_Pool_Pointer := null);
|
|
|
|
|
|
|
|
end H3.Limited_Pool;
|