[MLton-commit] r6579

Matthew Fluet fluet at mlton.org
Mon Apr 7 11:56:26 PDT 2008


Functions returning a stack-reserved size return a size that is
properly stack-reserved aligned.

----------------------------------------------------------------------

U   mlton/trunk/runtime/gc/stack.c

----------------------------------------------------------------------

Modified: mlton/trunk/runtime/gc/stack.c
===================================================================
--- mlton/trunk/runtime/gc/stack.c	2008-04-07 18:56:23 UTC (rev 6578)
+++ mlton/trunk/runtime/gc/stack.c	2008-04-07 18:56:25 UTC (rev 6579)
@@ -138,16 +138,18 @@
 }
 
 size_t sizeofStackInitialReserved (GC_state s) {
-  return alignStackReserved(s, sizeofStackSlop (s));
+  size_t res;
+
+  res = alignStackReserved(s, sizeofStackSlop (s));
+  return res;
 }
 
 size_t sizeofStackMinimumReserved (GC_state s, GC_stack stack) {
   size_t res;
 
-  res =
-    stack->used
-    + sizeofStackSlop (s)
-    - getStackTopFrameSize(s, stack);
+  res = alignStackReserved (stack->used
+                            + sizeofStackSlop (s)
+                            - getStackTopFrameSize(s, stack));
   return res;
 }
 




More information about the MLton-commit mailing list