1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- S Y S T E M . S T O R A G E _ P O O L S --
9 -- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
11 -- This specification is derived from the Ada Reference Manual for use with --
12 -- GNAT. The copyright notice above, and the license provisions that follow --
13 -- apply solely to the contents of the part following the private keyword. --
15 -- GNAT is free software; you can redistribute it and/or modify it under --
16 -- terms of the GNU General Public License as published by the Free Soft- --
17 -- ware Foundation; either version 3, or (at your option) any later ver- --
18 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
19 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
20 -- or FITNESS FOR A PARTICULAR PURPOSE. --
22 -- As a special exception under Section 7 of GPL version 3, you are granted --
23 -- additional permissions described in the GCC Runtime Library Exception, --
24 -- version 3.1, as published by the Free Software Foundation. --
26 -- You should have received a copy of the GNU General Public License and --
27 -- a copy of the GCC Runtime Library Exception along with this program; --
28 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
29 -- <http://www.gnu.org/licenses/>. --
31 -- GNAT was originally developed by the GNAT team at New York University. --
32 -- Extensive contributions were provided by Ada Core Technologies Inc. --
34 ------------------------------------------------------------------------------
36 with Ada
.Finalization
;
37 with System
.Storage_Elements
;
39 package System
.Storage_Pools
is
42 type Root_Storage_Pool
is abstract
43 new Ada
.Finalization
.Limited_Controlled
with private;
46 (Pool
: in out Root_Storage_Pool
;
47 Storage_Address
: out Address
;
48 Size_In_Storage_Elements
: System
.Storage_Elements
.Storage_Count
;
49 Alignment
: System
.Storage_Elements
.Storage_Count
)
53 (Pool
: in out Root_Storage_Pool
;
54 Storage_Address
: Address
;
55 Size_In_Storage_Elements
: System
.Storage_Elements
.Storage_Count
;
56 Alignment
: System
.Storage_Elements
.Storage_Count
)
60 (Pool
: Root_Storage_Pool
)
61 return System
.Storage_Elements
.Storage_Count
65 -- The following two procedures support the use of class-wide pool
66 -- objects in storage pools. When a local type is given a class-wide
67 -- storage pool, allocation and deallocation for the type must dispatch
68 -- to the operation of the specific pool, which is achieved by a call
69 -- to these procedures. (When the pool type is specific, the back-end
70 -- generates a call to the statically identified operation of the type).
72 procedure Allocate_Any
73 (Pool
: in out Root_Storage_Pool
'Class;
74 Storage_Address
: out Address
;
75 Size_In_Storage_Elements
: System
.Storage_Elements
.Storage_Count
;
76 Alignment
: System
.Storage_Elements
.Storage_Count
);
78 procedure Deallocate_Any
79 (Pool
: in out Root_Storage_Pool
'Class;
80 Storage_Address
: Address
;
81 Size_In_Storage_Elements
: System
.Storage_Elements
.Storage_Count
;
82 Alignment
: System
.Storage_Elements
.Storage_Count
);
84 type Root_Storage_Pool
is abstract
85 new Ada
.Finalization
.Limited_Controlled
with null record;
86 end System
.Storage_Pools
;