[m-users.] How to write stack-friendly mercury-code?
jfischer at opturion.com
Tue Mar 29 23:02:38 AEDT 2016
On Tue, 29 Mar 2016, Dirk Ziegemeyer wrote:
>> Am 28.03.2016 um 12:51 schrieb Paul Bone <paul at bone.id.au>:
>> On Mon, Mar 28, 2016 at 11:51:52AM +0200, Dirk Ziegemeyer 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.
> A fruitless try was to put this in the last line of file Mercury.options:
> MERCURY_OPTIONS = --detstack-size 8192
MERCURY_OPTIONS is an environment variable not a compiler option.
(See the ``Enviornment variables chatper of the user's guide.)
If you want to set the detstack size at compile time you can use the
compiler's '--runtime-flags' option. For exmample, in your
Mercury.options file do:
MCFLAGS = --runtime-flags "--detstack-size 8192"
More information about the users