[MLton] Stack size?

Stephen Weeks MLton@mlton.org
Fri, 8 Jul 2005 09:15:29 -0700


> You might be more interested in the @MLton thread-shrink-ratio 0.5
> -- runtime option which controls how quickly a thread seen by the GC
> has its stack shrunk to a minimal size.  (The cost of this is that
> when a thread has been shrunk but then resumes, it will incur a GC
> to grow to a larger size.)

Actually, thread resumption *may* incur a GC, but probably won't.  If
there isn't enough space on the stack, resumption will invoke GC_gc,
but this will only perform a garbage collection if there isn't space
at the heap frontier to allocate the new, double-size, stack.