comp.lang.ada
 help / color / mirror / Atom feed
From: sbelmont700@gmail.com
Subject: Re: GNAT: Why does a large 'new' allocation blow the stack when an initialiser is present ?
Date: Fri, 1 Nov 2013 03:19:01 -0700 (PDT)
Date: 2013-11-01T03:19:01-07:00	[thread overview]
Message-ID: <79199f0f-7392-4509-9ada-2e3ef2920a83@googlegroups.com> (raw)
In-Reply-To: <d843d1e1-a1ea-4818-b23d-aff833be2186@googlegroups.com>

On Thursday, October 31, 2013 10:49:20 PM UTC-4, Rod Kay wrote:
> It seems that, with the initialiser, GNAT is creating the array on the stack before copying it to the final heap memory ?

Don't necessarily assume they are on the heap.  Allocators of anonmous access types work differently than those of named types.  They are (or at least can be) put on the stack instead of the heap, since they are (or at least can be) reclaimed when the subprogram ends (13.11~25/2).

-sb


  parent reply	other threads:[~2013-11-01 10:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01  2:49 GNAT: Why does a large 'new' allocation blow the stack when an initialiser is present ? Rod Kay
2013-11-01  8:45 ` Simon Wright
2013-11-01 11:23   ` Rod Kay
2013-11-01 15:04   ` Georg Bauhaus
2013-11-01 10:19 ` sbelmont700 [this message]
2013-11-01 11:28   ` Rod Kay
replies disabled

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