[m-dev.] stack segments as default
Zoltan Somogyi
zoltan.somogyi at runbox.com
Sat Oct 24 22:23:57 AEDT 2015
On Sat, 24 Oct 2015 11:49:59 +0200, Dirk Ziegemeyer <dirk at ziegemeyer.de> wrote:
> Do I understand it right, that the use of stseg would avoid stack overflow errors like described in Mantis #385 and mailing list http://www.mercurylang.org/list-archives/developers/2015-April/016288.html?
In low level grades, yes. In those grades, Mercury manages the stacks itself,
and with stack segments, the available stack space is limited only by the
availability of memory and its fragmentation.
In high level grades, Mercury does not manage the stack. Instead, we leave
the management of the stack to the C, Java, C# or Erlang compiler.
> This would be a very good reason to make stseg the default grade.
That is our reasoning as well. However, there is a cost: a slight slowdown.
Zoltan.
More information about the developers
mailing list