[m-dev.] diff: default stack size using MSVC

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Aug 26 14:14:16 AEST 2000


On 25-Aug-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> scripts/ml.in:
>         Set the default stack size to 10Mb when linking programs
>         compiled with MSVC.
...
> +++ ml.in       2000/08/25 14:18:19
> @@ -34,6 +34,13 @@
>  SHARED_LIBS=${MERCURY_SHARED_LIBS="@SHARED_LIBS@"}
>  TMPDIR=${TMPDIR=/tmp}
> 
> +# When compiling in the hlc.gc grade using the Microsoft Visual C
> +# compiler, the default maximum stack size of 4Mb is too low for a
> +# recursive language.
> +# XXX at some stage this should become an option to ml
> +LINK=/stack:10485760   # 10 Mb
> +export LINK

A problem with this change is that it provides no way for the user
to override this setting (e.g. in case even 10 Mb is not enough).
It would be better to write that using the same approach as is
used for TMPDIR above, i.e.

	LINK=${LINK=/stack:10485760}   # 10 Mb

This way, the user can override this by just setting the LINK
environment variable, rather than having to modify the `ml' script.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list