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,64ff9ad5eeabedcd X-Google-Attributes: gid103376,public From: comar@lang8.cs.nyu.edu (Cyrille Comar) Subject: Re: Unconstrained Objects Date: 1995/04/06 Message-ID: <3m1prp$6ju@cmcl2.NYU.EDU>#1/1 X-Deja-AN: 100939434 distribution: world references: <3lh61g$1hu@news.kreonet.re.kr> <3ls78u$nr3@gnat.cs.nyu.edu> <3m13mo$6b9@killerbee.jsc.nasa.gov> organization: New York University newsgroups: comp.lang.ada Date: 1995-04-06T00:00:00+00:00 List-Id: 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