comp.lang.ada
 help / color / mirror / Atom feed
From: comar@lang8.cs.nyu.edu (Cyrille Comar)
Subject: Re: Unconstrained Objects
Date: 1995/04/06
Date: 1995-04-06T00:00:00+00:00	[thread overview]
Message-ID: <3m1prp$6ju@cmcl2.NYU.EDU> (raw)
In-Reply-To: 3m13mo$6b9@killerbee.jsc.nasa.gov

HUMPHREY_TERRY (HUMPHREY@ASD1.JSC.NASA.GOV) wrote:

: Does this mean that GNAT does not implicitly allocated from the heap
: under any circumstances?  If the answer is no, then under what circumstances
: does GNAT implicitly allocate from the heap?

GNAT allocates outer-level objects with a non-static size on the
heap. This is the only case of implicit allocation that will remains
in the final version.  GNAT used to allocate anonymous objects (for
functions returning unconstrained types) on the heap but it is not the
case anymore, now those objects are alocated on a secondary stack. If
you find other implicit uses of the heap (that is to say, leaks), they
are considered BUGS and should be reported as such to gnat-report.

In fact, there is another case of implicit allocation for the current
implementation of the secondary-stack, if it grows too much, it
allocates a new block on the heap.
In contexts where this is not desired, it is easy to provide another
implementation of the secondary-stack (in s-secsta.ad?) which is a
regular storage pool. No change to the compiler itself is needed, you
don't even need to recompile it...

--
------------------------------------------------------------------------
Cyrille Comar,                                  E-mail: comar@cs.nyu.edu
Gnat Project                                    US phone: (212) 998-3489





  reply	other threads:[~1995-04-06  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-31  0:00 Unconstrained Objects Eric Shulman
1995-04-04  0:00 ` Robert Dewar
1995-04-06  0:00   ` HUMPHREY_TERRY
1995-04-06  0:00     ` Cyrille Comar [this message]
1995-04-07  0:00       ` Robert Dewar
1995-04-07  0:00     ` Robert Dewar
     [not found] ` <3lt22a$18p@maple.enet.net>
1995-04-06  0:00   ` Robert Dewar
replies disabled

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