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,ae395e5c11de7bc9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!k24g2000pro.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: segfault with large-ish array with GNAT Date: Thu, 18 Mar 2010 12:51:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <642ddf8b-1d45-4f74-83ad-2c755040ca33@k24g2000pro.googlegroups.com> <4ba13454$0$6720$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1268941884 21241 127.0.0.1 (18 Mar 2010 19:51:24 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 18 Mar 2010 19:51:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k24g2000pro.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:10627 Date: 2010-03-18T12:51:24-07:00 List-Id: On Mar 18, 3:13=A0am, Jeffrey Creem wrote: > > As for wishing that the compiler would automatically switch between heap > and stack, that would probably be a terrible idea and render the > language quite unsuitable for embedded systems. Ummm, you're mixing two things there. The *language* is suitable for embedded systems. The language does not dictate anything about where things are stored, and nobody is asking for the Ada standard to require that every Ada implementation be able to allocate every large local array it sees. Not every compiler that compiles the language will be suitable for embedded systems, but that's not a bad thing--- not everyone who uses an Ada compiler is using it for embedded systems, and those that aren't shouldn't mind if their particular Ada *implementation* does things in a way that's not suitable for embedded systems. I don't see a problem with a compiler generating code to allocate arrays on the heap that it knows will be large, or supporting a pragma that tells it to put arrays on the heap. -- Adam