1
-------------------------------------------------------------------------------
3
-- <STRONG>Copyright (c) 2001, 2002 by Thomas Wolf.</STRONG>
5
-- This piece of software is free software; you can redistribute it and/or
6
-- modify it under the terms of the GNU General Public License as published
7
-- by the Free Software Foundation; either version 2, or (at your option)
8
-- any later version. This unit is distributed in the hope that it will be
9
-- useful, but <EM>without any warranty</EM>; without even the implied
10
-- warranty of <EM>merchantability or fitness for a particular purpose.</EM>
11
-- See the GNU General Public License for more details. You should have
12
-- received a copy of the GNU General Public License with this distribution,
13
-- see file "<A HREF="GPL.txt">GPL.txt</A>". If not, write to the Free
14
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18
-- As a special exception from the GPL, if other files instantiate generics
19
-- from this unit, or you link this unit with other files to produce an
20
-- executable, this unit does not by itself cause the resulting executable
21
-- to be covered by the GPL. This exception does not however invalidate any
22
-- other reasons why the executable file might be covered by the GPL.
26
-- Author:</STRONG><DD>
28
-- <ADDRESS><A HREF="mailto:twolf@acm.org">twolf@acm.org</A></ADDRESS></DL>
31
-- Purpose:</STRONG><DD>
32
-- A default storage pool that uses the pool of an arbitrary
33
-- access-to-integer type.</DL>
36
-- Tasking semantics:</STRONG><DD>
37
-- As all pools, fully task safe.</DL>
40
-- Storage semantics:</STRONG><DD>
41
-- It's a <EM>storage pool</EM>, so of course it does dynamic storage
42
-- allocations and deallocations.</DL>
47
-- 27-NOV-2001 TW Initial version.
48
-- 28-APR-2003 TW Removed the Pool variable that was formerly used to
49
-- instantiate GAL.Storage.Standard.
51
-------------------------------------------------------------------------------
53
pragma License (Modified_GPL);
55
with System.Storage_Pools;
56
with System.Storage_Elements;
58
package GAL.Storage.Default is
60
pragma Elaborate_Body;
63
new System.Storage_Pools.Root_Storage_Pool with null record;
64
-- A plain vanilla pool that is the same as the pool for an access-to-
65
-- integer type. Note that it is entirely implementation-defined whether
66
-- one may use this pool for other types as well.
68
-- (Ada 95 *is* lacking a standardized feature to somehow define a
69
-- "default" storage pool which, when given in a representation clause,
70
-- would effectively make the system use whatever pool it'd use if there
71
-- was no representation clause. It turns out that GNAT at least seems to
72
-- use one pool for all types, so using 'Standard_Pool' below for the
73
-- instantiations of the container packages works all right.)
76
(Pool : in out Manager;
77
Storage_Address : out System.Address;
78
Size : in System.Storage_Elements.Storage_Count;
79
Alignment : in System.Storage_Elements.Storage_Count);
82
(Pool : in out Manager;
83
Storage_Address : in System.Address;
84
Size : in System.Storage_Elements.Storage_Count;
85
Alignment : in System.Storage_Elements.Storage_Count);
89
return System.Storage_Elements.Storage_Count;
91
end GAL.Storage.Default;