[m-users.] How to write stack-friendly mercury-code?
dirk at ziegemeyer.de
Tue Mar 29 22:42:20 AEDT 2016
> Am 29.03.2016 um 06:58 schrieb Julien Fischer <jfischer at opturion.com>:
> On Mon, 28 Mar 2016, Paul Bone wrote:
>> + Increase the size of the stack.
>> In low-level graces, like asm_fast, put MERCURY_OPTIONS="--detstack-size
>> N" in your environment. Check the Mercury user's guide.
> For completeness:
> In high-level C grades, Mercury programs just use the normal C stack. On
> Unix-like platforms on you can adjust this using ulimit. On Windows,
> you can use mmc's '--cstack-reserve-size' option to set the stack size
> at compile time. (Alternatively, if you have Microsoft's dev tools
> installed you can use the editbin utility to modify the size.)
Thank you for this hint.
Invoking the MinGW-cross-compiler with
mmc --make --optimize-constructor-last-call --cstack-reserve-size 8388608
didn’t help and even slowed down the execution speed of the compiled application.
Did I use a reasonable stack size?
More information about the users