From: Tucker Taft <stt@averstar.com>
Subject: Re: Creation of storage pools
Date: 1999/06/04
Date: 1999-06-04T00:00:00+00:00 [thread overview]
Message-ID: <3758101E.60CD9E18@averstar.com> (raw)
In-Reply-To: m36754fral.fsf@mheaney.ni.net
Matthew Heaney wrote:
>
> Graeme Perkes <graeme.perkes@sydney.gecm.com> writes:
>
> > The problem is how to use the storage pools I've created.
> > I'm having trouble with "for XYZ'storage_pool use ..." syntax
> > when used with a USER_POOL access variable:
> >
> > STORAGE_POOLS_LIST : POOL_CFG_PTR := null;
> >
> > -- STORAGE_POOLS_LIST is populated by an initialisation procedure
> >
> > MY_POOL : POOL_LIST.POOL_PTR := STORAGE_POOLS_LIST(I);
> >
> > type INT_ACC is access INTEGER;
> > for INT_ACC'storage_pool use MY_POOL.all;
> >
> > GNAT 3.11b2 responds with the following error for the use clause:
> >
> > "incorrect reference to a Storage Pool"
> >
> > What am I doing wrong?
>
> Aren't attribute rep clauses static?
Not all of them. Clearly those that require that the
expression denote a variable can't require that it be a static
expression.
> ... You have to bind to a statically
> declared storage pool object, not a dynamically declared one.
Not necessarily true in this case, though conceivably
GNAT may have such a restriction. The only hard requirement
is that the storage pool object denoted be a variable (see RM95 13.11(15)).
> ...
> > Am I trying to violate basic principles of storage pools?
>
> It would appear so.
No, you are not violating any basic principle. Conceivably
GNAT has a restriction (or bug) in this area.
> See the package System.Pool_Global, in the gnat sources, for an example.
--
-Tucker Taft stt@averstar.com http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.) Burlington, MA USA
next prev parent reply other threads:[~1999-06-04 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-26 0:00 Creation of storage pools Graeme Perkes
1999-06-04 0:00 ` Matthew Heaney
1999-06-04 0:00 ` Tucker Taft [this message]
1999-06-05 0:00 ` Simon Wright
1999-06-07 0:00 ` Graeme Perkes
1999-06-07 0:00 ` adam
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox