[MLton-commit] r7059

Matthew Fluet fluet at mlton.org
Wed Apr 8 05:31:57 PDT 2009


Share out-of-memory error message.
----------------------------------------------------------------------

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

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

Modified: mlton/trunk/runtime/gc/heap.c
===================================================================
--- mlton/trunk/runtime/gc/heap.c	2009-04-08 12:31:52 UTC (rev 7058)
+++ mlton/trunk/runtime/gc/heap.c	2009-04-08 12:31:55 UTC (rev 7059)
@@ -484,16 +484,18 @@
       goto oom;
     }
   } else {
-oom:
-    if (s->controls.messages)
-      GC_displayMem ();
-    die ("Out of memory.  Unable to allocate heap with %s bytes.\n",
-         uintmaxToCommaString(minSize));
+    goto oom;
   }
 done:
   unless (origStart == s->heap.start) {
     translateHeap (s, origStart, s->heap.start, s->heap.oldGenSize);
   }
+  return;
+oom:
+  if (s->controls.messages)
+    GC_displayMem ();
+  die ("Out of memory.  Unable to allocate heap with %s bytes.\n",
+       uintmaxToCommaString(minSize));
 }
 
 /* resizeHeap (s, minSize)




More information about the MLton-commit mailing list