CVS difference for acats/new/bdb4001.a
--- acats/new/bdb4001.a 2019/12/31 05:12:19 1.2
+++ acats/new/bdb4001.a 2019/12/31 05:47:25 1.3
@@ -74,7 +74,6 @@
--!
-with Ada.Containers.Ordered_Maps;
with System.Storage_Pools.Subpools;
with System.Storage_Elements;
@@ -136,7 +135,6 @@
Pool : in out Tracked_Pool;
Subpool : in out Subpools.Subpool_Handle);
- use Ada.Containers;
use System;
type Allocator_Info is
@@ -177,28 +175,20 @@
function Enclosing_Subpool
(Pool : Tracked_Pool; Storage_Address : System.Address) return
Tracked_Subpool_Handle is
-
- Result : Tracked_Subpool_Handle;
-
- procedure Set_Result (Mapping : Map) is
- Position : constant Cursor
- := Floor (Mapping, Storage_Address);
- Info : Allocator_Info;
- begin
- Result := null;
- if Position /= No_Element then
- Info := Element (Position);
- if Storage_Address < Info.Storage_Address
+ begin
+ for I in Pool.Allocation_Map'Range loop
+ declare
+ Info : Allocator_Info renames Pool.Allocation_Map(I);
+ begin
+ if Storage_Address >= Info.Storage_Address and then
+ Storage_Address < Info.Storage_Address
+ Info.Size_In_Storage_Elements then
- Result := Info.Subpool;
+ return Info.Subpool;
end if;
- end if;
- end Set_Result;
-
- Ignored : Null_Record renames
- Pool.Allocation_Map.Read (Set_Result'Access);
- begin
- return Result;
+ end;
+ end loop;
+ -- Not found:
+ return null;
end Enclosing_Subpool;
type Tracked_Subpool_Ref is access all Tracked_Subpool;
Questions? Ask the ACAA Technical Agent