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!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Storage_Size in a Simple Program Date: Wed, 31 Oct 2018 15:45:06 -0500 Organization: JSA Research & Innovation 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> Injection-Date: Wed, 31 Oct 2018 20:45:07 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="29241"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:54734 Date: 2018-10-31T15:45:06-05:00 List-Id: "Niklas Holsti" wrote in message news:g3rprtFfc9dU1@mid.individual.net... > 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. Yup. Sounds like a reasonable enhancement request (too late for Ada 2020, unfortunately, but possibly in a future Corrigendum or revision). I suggest sending it and a use-case to Ada-Comment. Randy.