From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,58b0908d72573b94 X-Google-Attributes: gid103376,public From: Andy Askey Subject: Re: Allocation from storage pools Date: 1999/07/01 Message-ID: <377BACBB.E8FCE71@res.raytheon.com>#1/1 X-Deja-AN: 496093463 Content-Transfer-Encoding: 7bit References: <3777BE5C.21C2B5CE@res.raytheon.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@swl.msd.ray.com X-Trace: swlmail.msd.ray.com 930848428 17471 199.46.171.9 (1 Jul 1999 17:00:28 GMT) Organization: Raytheon Systems Company Mime-Version: 1.0 NNTP-Posting-Date: 1 Jul 1999 17:00:28 GMT Newsgroups: comp.lang.ada Date: 1999-07-01T17:00:28+00:00 List-Id: Thanx for the info. The Booch URL and the Barnes references were exactly what I was looking for. Andy Andy Askey wrote: > > 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. > > Any help on this topic will be greatly appreciated. --------------------------------------------------- | Andy Askey | | Software Engineer | | Raytheon Systems Company | | 670 Discovery Drive, Huntsville, AL 35806 | | Phone: (256) 971-2367 Fax: (256) 971-2306 | | andrew_j_askey@res.raytheon.com | ---------------------------------------------------