comp.lang.ada
 help / color / mirror / Atom feed
* Is Storage Subpool Example tested?
@ 2012-04-25 21:18 ytomino
  2012-04-26  3:03 ` Randy Brukardt
  0 siblings, 1 reply; 5+ messages in thread
From: ytomino @ 2012-04-25 21:18 UTC (permalink / raw)


Hello.

I'm trying to compile http://ada-auth.org/standards/12rm/html/RM-13-11-6.html , but there are some errors.

Perhaps, 

1. "use type System.Storage_Pools.Subpools.Subpool_Handle;" is missing.

2. 2nd parameter of Set_Pool_of_Subpool is "in out", but access value is given.

3. Downcast as MR_Subpool is missing in
> Result.Start := Pool.Next_Allocation;

4. ".Start" is missing in
> Pool.Next_Allocation := Pool.Markers(Pool.Current_Pool);

(And, I had to replace some 'Unchecked_Access to 'Unrestricted_Access, but this is GNAT's feature. I don't care it.)

BTW, Do you have a interesting idea to use subpools?
For instance, I like Matthew Heaney's System.Initialization. ( http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0001-1.txt?rev=1.17 )
It seems to be able to implement by user with subpool.

 P := System.Initialization.New_Object (Storage);

is able to be rewritten like below

 P := new (Make_Subpool_Using_Given_Address (Storage'Address)) Object_Type;

However, Delete_Object is difficult. :-)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-27  7:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-25 21:18 Is Storage Subpool Example tested? ytomino
2012-04-26  3:03 ` Randy Brukardt
2012-04-26  4:37   ` ytomino
2012-04-27  0:32     ` Randy Brukardt
2012-04-27  7:56       ` ytomino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox