Index: src/natools-references.ads ================================================================== --- src/natools-references.ads +++ src/natools-references.ads @@ -21,13 +21,16 @@ -- concurrency. However since there is no internal state, operations on -- -- non-overlapping objects should be thread-safe. -- ------------------------------------------------------------------------------ with Ada.Finalization; +with System.Storage_Pools; generic type Held_Data (<>) is limited private; + Counter_Pool : in out System.Storage_Pools.Root_Storage_Pool'Class; + Data_Pool : in out System.Storage_Pools.Root_Storage_Pool'Class; package Natools.References is pragma Preelaborate (References); type Reference is new Ada.Finalization.Controlled with private; @@ -81,12 +84,14 @@ private type Counter is new Natural; type Counter_Access is access Counter; + for Counter_Access'Storage_Pool use Counter_Pool; type Data_Access is access Held_Data; + for Data_Access'Storage_Pool use Data_Pool; type Reference is new Ada.Finalization.Controlled with record Count : Counter_Access := null; Data : Data_Access := null; end record; Index: tests/natools-reference_tests.ads ================================================================== --- tests/natools-reference_tests.ads +++ tests/natools-reference_tests.ads @@ -20,12 +20,13 @@ ------------------------------------------------------------------------------ with Natools.Tests; private with Ada.Finalization; --- private with GNAT.Debug_Pools; +private with GNAT.Debug_Pools; private with Natools.References; +private with System.Storage_Pools; package Natools.Reference_Tests is package NT renames Natools.Tests; @@ -46,11 +47,13 @@ end record; function Factory return Counter; overriding procedure Finalize (Object : in out Counter); --- Pool : GNAT.Debug_Pools.Debug_Pool; + Pool : GNAT.Debug_Pools.Debug_Pool; - package Refs is new Natools.References (Counter); --- (Counter, System.Pool_Global.Global_Pool_Object, Pool); + package Refs is new Natools.References + (Counter, + System.Storage_Pools.Root_Storage_Pool'Class (Pool), + System.Storage_Pools.Root_Storage_Pool'Class (Pool)); end Natools.Reference_Tests;