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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Storage_Size in a Simple Program Date: Tue, 30 Oct 2018 21:31:14 +0200 Organization: Tidorum Ltd Message-ID: References: <1nx0yp3.x6ss3k18nq71lN%csampson@inetworld.net> <1nx5k9a.1n8zqjs1xf0pe6N%csampson@inetworld.net> <50b40e43-623a-4015-95b3-91c5d4736e53@googlegroups.com> <2635fb12-5836-4713-998d-e8179b801500@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net iaIUzCZjoLv2Sul1lLyJcwJig44E+DHuQgRU5xBfV8F/EdSnjR Cancel-Lock: sha1:8gBjah5Gf/ZU1csWp1U8mCzYVr0= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:54725 Date: 2018-10-30T21:31:14+02:00 List-Id: On 18-10-29 22:58 , Randy Brukardt wrote: > wrote in message > news:2635fb12-5836-4713-998d-e8179b801500@googlegroups.com... >>> Since the main program's stack limit is determined by the OS, I don't >>> see how an Ada aspect/pragma can affect it. > ... >> On Windows it may be possible to specify the size of stack at link time. >> Consider for example the Windows linker that has a flag /Stack to be able >> to set the size of the stack in bytes: >> https://msdn.microsoft.com/en-us/library/y0zzbyt4.aspx > > That's the only way I know for Windows. Janus/Ada has a binder option that > sets the stack size in the generated .OBJ file, and the Windows linker then > puts that in the executable. I believe that GNAT has something similar on > Windows (haven't had to try that to date). That sounds as if the environment stack size _could_ theoretically be specified in the Ada source, for the Janus/Ada compiler to export to the Janus/Ada binder, which would then set it in the .OBJ for the Windws linker. Still we would need a standard way (a pragma or aspect, no doubt) to specify the size in the Ada source. That way is currently missing, AFAIK. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .