[MLton] MLton calling convention and closure conversion
Stephen Weeks
sweeks at sweeks.com
Tue Jan 23 13:26:56 PST 2007
> Felix puts function stack frames on the stack if it can prove that
> on exit from the functions there can't be any pointers into the
> stack frame:
That is necessary but not sufficient, at least for the notion of space
safety that we aim for in MLton. We would not find it acceptable to
put a large object on the stack, call some function, use the object,
then drop the final pointer to the object while remaining in the inner
function, and not have the object be collectable. In our opinion,
that is a space leak.
> The ridiculously small stacks provided by Linux are a good reason to
> avoid the stack ;(
Linux's small stacks aren't relevant for MLton. We use our own
resizable heap-allocated stack.
More information about the MLton
mailing list