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,42a57c8ee023f14d X-Google-Attributes: gid103376,public From: kdm@rational.com (Kent Mitchell) Subject: Re: Q: memory management Date: 1996/06/18 Message-ID: <4q6ios$f72@rational.rational.com>#1/1 X-Deja-AN: 160851958 references: organization: Rational Software Corporation newsgroups: comp.lang.ada Date: 1996-06-18T00:00:00+00:00 List-Id: Jon S Anthony (jsa@organon.com) wrote: : In article Hannes Haug writes: : > I think "new Storage_Array (n)" will give me a little bit too : > much storage. The array bounds need some space. : I don't know what "storage_array" is, but don't worry about the : space for bounds. It's all taken care of for you. Actually a more interesting question to consider is why you would want to allocate a generic pool of space within Ada. C has this because C *only* has generic pointers. Ada has a more controlled concept of allocation with pointers to specific types which are not generally interchangable. This allows the language to manage pools of different objects and still provide reasonable type safety, etc. Generally, if you need to allocate a buffer, it is a buffer of some specific things (characters, bytes, records, etc.). So ... you might want to look at doing things in a more Ada-like way instead of a C-like general buffer. -- Kent Mitchell | One possible reason that things aren't Technical Consultant | going according to plan is ..... Rational Software Corporation | that there never *was* a plan!