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,e96c2a44f9b7cb1b X-Google-Attributes: gid103376,public From: matthew_heaney@acm.org (Matthew Heaney) Subject: Re: Allocating memory--Ada95 Date: 1998/05/19 Message-ID: #1/1 X-Deja-AN: 354862388 Content-Transfer-Encoding: 8bit References: <6jsa9j$ous$1@nnrp1.dejanews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Organization: Network Intensive Newsgroups: comp.lang.ada Date: 1998-05-19T00:00:00+00:00 List-Id: In article <6jsa9j$ous$1@nnrp1.dejanews.com>, jsanchor@my-dejanews.com wrote: (start of quote) I am trying to dynamically allocate storage(using 'new' allocator)...but I need to allocate within certain bounds. Does anybody know how. Thank you in advance. (end of quote) Override Root_Storage_Pool, declare an object of that type, and place storage in memory where you require, as in with System.Storage_Pools; use ...; package My_Storage_Pools is type My_Storage_Pool (Size : Positive) is new Root_Storage_Pool with record Elements : Storage_Element_Array (1 .. Size); end record; end; with My_Storage_Pool; use ...; package Allocation is Pool : My_Storage_Pool (); for Pool'Address use ; end; Now when you declare an access type, use your custom pool to as its storage pool: with Allocation; package P is type T is ...; type T_Access is access T; for T_Access'Storage_Pool use Allocation.Pool; end; That's the general flavor of solution.