comp.lang.ada
 help / color / mirror / Atom feed
From: kdm@rational.com (Kent Mitchell)
Subject: Re: Q: memory management
Date: 1996/06/18
Date: 1996-06-18T00:00:00+00:00	[thread overview]
Message-ID: <4q6ios$f72@rational.rational.com> (raw)
In-Reply-To: JSA.96Jun15190253@organon.com


Jon S Anthony (jsa@organon.com) wrote:
: In article <uvv4tod9j9e.fsf@chaq.informatik.uni-tuebingen.de> Hannes Haug <Hannes.Haug@Student.Uni-Tuebingen.de> 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!




  parent reply	other threads:[~1996-06-18  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-15  0:00 Q: memory management Hannes Haug
1996-06-15  0:00 ` Robert Dewar
1996-06-15  0:00 ` Jon S Anthony
1996-06-16  0:00   ` Robert Dewar
1996-06-18  0:00   ` Kent Mitchell [this message]
1996-06-16  0:00 ` Hannes Haug
1996-06-17  0:00   ` Tucker Taft
1996-06-17  0:00   ` Hannes Haug
1996-06-18  0:00   ` Hannes Haug
1996-06-18  0:00     ` Tucker Taft
1996-06-19  0:00     ` Hannes Haug
1996-06-18  0:00 ` Jon S Anthony
  -- strict thread matches above, loose matches on Subject: below --
1996-06-19  0:00 W. Wesley Groleau (Wes)
1996-06-20  0:00 ` Hannes Haug
1996-06-20  0:00   ` Robert Dewar
1996-06-20  0:00 ` Hannes Haug
1996-06-21  0:00 ` Hannes Haug
1996-06-21  0:00   ` Robert Dewar
1996-06-25  0:00 ` Hannes Haug
1996-06-24  0:00 Q: Memory management W. Wesley Groleau (Wes)
1996-06-25  0:00 ` Jon S Anthony
1996-06-26  0:00   ` Robert Dewar
1996-06-25  0:00 ` Hannes Haug
1996-06-25  0:00   ` Robert A Duff
1996-06-25  0:00   ` Tucker Taft
     [not found]     ` <Dtzv4J.9FL@thomsoft.com>
1996-07-17  0:00       ` Robert Dewar
1996-06-27  0:00 ` Hannes Haug
     [not found] <JSA.96Jun26142033@organon.com>
1996-06-27  0:00 ` Hannes Haug
1996-06-27  0:00 ` Hannes Haug
1996-06-27  0:00   ` Robert A Duff
replies disabled

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