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,55a9bf0fafa82b43 X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: Very basic questions about memory allocation Date: 1999/07/31 Message-ID: #1/1 X-Deja-AN: 507159999 References: X-Complaints-To: abuse@pacbell.net X-Trace: typhoon-sf.snfc21.pbi.net 933379415 206.170.2.110 (Fri, 30 Jul 1999 17:03:35 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Fri, 30 Jul 1999 17:03:35 PDT Newsgroups: comp.lang.ada Date: 1999-07-31T00:00:00+00:00 List-Id: > type t is .... > ... > v:access t; > begin > v:=new t; > end; Are you sure you need heap allocation? Since Ada allows highly dynamic stack allocation, there is much less need for "new" and "free". For instance, if "type t is array(integer range <>) of something;" and X is a floating point number, v : t(integer(sqrt(X/2.0)) .. integer(sqrt(X))); is perfectly legal Ada. You can just let the compiler handle the space allocation and deallocation.