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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.17.234 with SMTP id r10mr257469pad.40.1383301141797; Fri, 01 Nov 2013 03:19:01 -0700 (PDT) X-Received: by 10.182.44.163 with SMTP id f3mr2407obm.34.1383301141728; Fri, 01 Nov 2013 03:19:01 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.ripco.com!news.glorb.com!z6no1341378pbz.1!news-out.google.com!9ni3696qaf.0!nntp.google.com!o2no13572938qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 1 Nov 2013 03:19:01 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=20.132.64.141; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 20.132.64.141 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <79199f0f-7392-4509-9ada-2e3ef2920a83@googlegroups.com> Subject: Re: GNAT: Why does a large 'new' allocation blow the stack when an initialiser is present ? From: sbelmont700@gmail.com Injection-Date: Fri, 01 Nov 2013 10:19:01 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 1821 Xref: number.nntp.dca.giganews.com comp.lang.ada:183771 Date: 2013-11-01T03:19:01-07:00 List-Id: 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 st= ack before copying it to the final heap memory ? Don't necessarily assume they are on the heap. Allocators of anonmous acce= ss 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