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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bf2571446148ae30 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.73.229 with SMTP id o5mr282843pbv.7.1325733428206; Wed, 04 Jan 2012 19:17:08 -0800 (PST) Path: lh20ni130208pbb.0!nntp.google.com!news1.google.com!postnews.google.com!q9g2000yqe.googlegroups.com!not-for-mail From: Jerry Newsgroups: comp.lang.ada Subject: Re: Can't set executable stack size during compilation Date: Wed, 4 Jan 2012 19:12:27 -0800 (PST) Organization: http://groups.google.com Message-ID: <4157b2ab-62ba-4e54-b382-42c35f530e20@q9g2000yqe.googlegroups.com> References: NNTP-Posting-Host: 97.117.185.89 Mime-Version: 1.0 X-Trace: posting.google.com 1325733266 29116 127.0.0.1 (5 Jan 2012 03:14:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 5 Jan 2012 03:14:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q9g2000yqe.googlegroups.com; posting-host=97.117.185.89; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HLUARECNK X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-01-04T19:12:27-08:00 List-Id: On Jan 4, 8:49=A0am, Erich wrote: > I have a problem setting the stack size of a GNAT made program during > compilation. It is a bit memory extensive and sometimes yields a > storage error with the standard stack size (I'd prefer to avoid the > heap for the time being). > There has been discussed several times here a very cool and elegant way to allocate from the heap without trashing your program or re- writing code so that it can accept pointers as arguments. The link http://groups.google.com/group/comp.lang.ada/browse_thread/thread/ae395e5c1= 1de7bc9/bda8d61bd3a66ee9?hl=3Den&q=3DJerry+stack&lnk=3Dnl& mentions this. However, I have found that even with large arrays allocated from the heap using pointers, when using the "-" operator (for example) on the arrays, large amounts of memory might be required from the stack. I believe that this is because the intermediate result result of "-" is taken from the stack. You might be able to write your own "-" overload in that case and see if it behaves differently. Jerry