1--  Copyright 1998-1999 Pat Rogers
2--  Copyright 1999-2014 Simon Wright <simon@pushface.org>
3
4--  This package is free software; you can redistribute it and/or
5--  modify it under terms of the GNU General Public License as
6--  published by the Free Software Foundation; either version 2, or
7--  (at your option) any later version. This package is distributed in
8--  the hope that it will be useful, but WITHOUT ANY WARRANTY; without
9--  even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10--  PARTICULAR PURPOSE. See the GNU General Public License for more
11--  details. You should have received a copy of the GNU General Public
12--  License distributed with this package; see file COPYING.  If not,
13--  write to the Free Software Foundation, 59 Temple Place - Suite
14--  330, Boston, MA 02111-1307, USA.
15
16--  As a special exception, if other files instantiate generics from
17--  this unit, or you link this unit with other files to produce an
18--  executable, this unit does not by itself cause the resulting
19--  executable to be covered by the GNU General Public License.  This
20--  exception does not however invalidate any other reasons why the
21--  executable file might be covered by the GNU Public License.
22
23with System.Storage_Pools;
24with System.Storage_Elements;
25
26package BC.Support.Unmanaged_Storage is
27
28   pragma Preelaborate;
29
30   package SSE renames System.Storage_Elements;
31   package SSP renames System.Storage_Pools;
32
33   type Pool is new SSP.Root_Storage_Pool with private;
34
35
36   procedure Allocate (The_Pool : in out Pool;
37                       Storage_Address : out System.Address;
38                       Size_In_Storage_Elements : SSE.Storage_Count;
39                       Alignment : SSE.Storage_Count);
40   pragma Inline (Allocate);
41
42   procedure Deallocate (The_Pool : in out Pool;
43                         Storage_Address : System.Address;
44                         Size_In_Storage_Elements : SSE.Storage_Count;
45                         Alignment : SSE.Storage_Count);
46   pragma Inline (Deallocate);
47
48   function Storage_Size (This : Pool) return SSE.Storage_Count;
49   pragma Inline (Storage_Size);
50
51private
52
53   type Pool is new SSP.Root_Storage_Pool with null record;
54
55end BC.Support.Unmanaged_Storage;
56