comp.lang.ada
 help / color / mirror / Atom feed
From: jclezy@aol.com (JClezy)
Subject: Re: Allocation from storage pools
Date: 1999/06/29
Date: 1999-06-29T00:00:00+00:00	[thread overview]
Message-ID: <19990629075445.29161.00002851@ng65.aol.com> (raw)
In-Reply-To: 3777BE5C.21C2B5CE@res.raytheon.com

>I am trying to figure out the best method (most efficient-least runtime
>hit) to allocate/deallocate memory to dynamic objects.  Here is what I
>want to do, in general:
>
>1) Grab a chunk of memory during program initialization to serve as a
>dynamic allocation pool for subsequent object memory allocation.
>
>2) Allocate new objects (various types) from the previous allocated
>chunk of memory.  I'd like to do something like this:
>
>  newobj := new newobj_type; (or some form like that, not necessarily
>overloading new, that grabs memory from the chunk)
>
>3) Deallocate the objects when I am done with in (freeing up the memory
>from the big chunk).
>
>I am developing in Apex Ada95 on a Solaris OS.  I found some
>documentation about this in
>System.Storage_Pools.Rational.Storage_Pools.  I do not really want to
>use something that is Apex specific.
>
>My questions:
>
>Does Ada95 give me anything I can use to implement 1,2,&3 above?  I can
>write my own code fairly easily to do this, but I want to take advantage
>of anything already provided by Ada95.
>

I dont know if this will help but Ada 83 & 95 provided private memory pools. I
cant remember the exact syntax however in essence you specify the amount of
storage to be used for a private pool for a particular access type. When an
object is created via new the memory is taken from the private pool not the
heap. This would require you to create a private pool for each access type.
This is briefly covered in Barnes somewhere.




  parent reply	other threads:[~1999-06-29  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-28  0:00 Allocation from storage pools Andy Askey
1999-06-28  0:00 ` Jeffrey D. Cherry
1999-06-29  0:00 ` JClezy [this message]
1999-06-29  0:00   ` Jeffrey D. Cherry
1999-07-01  0:00 ` Andy Askey
replies disabled

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