[MLton-commit] r6272

Matthew Fluet fluet at mlton.org
Fri Dec 14 21:21:30 PST 2007


Tweaks to OOM messages
----------------------------------------------------------------------

U   mlton/trunk/runtime/gc/array-allocate.c
U   mlton/trunk/runtime/gc/heap.c

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

Modified: mlton/trunk/runtime/gc/array-allocate.c
===================================================================
--- mlton/trunk/runtime/gc/array-allocate.c	2007-12-15 05:17:34 UTC (rev 6271)
+++ mlton/trunk/runtime/gc/array-allocate.c	2007-12-15 05:21:29 UTC (rev 6272)
@@ -28,7 +28,7 @@
     (uintmax_t)bytesPerElement * (uintmax_t)numElements + GC_ARRAY_HEADER_SIZE;
   arraySizeAlignedMax = alignMax (arraySizeMax, s->alignment);
   if (arraySizeAlignedMax >= (uintmax_t)SIZE_MAX)
-    die ("Out of memory: cannot allocate array with %s bytes.",
+    die ("Out of memory.  Unable to allocate array with %s bytes.",
          uintmaxToCommaString(arraySizeAlignedMax));
   arraySize = (size_t)arraySizeMax;
   arraySizeAligned = (size_t)arraySizeAlignedMax;

Modified: mlton/trunk/runtime/gc/heap.c
===================================================================
--- mlton/trunk/runtime/gc/heap.c	2007-12-15 05:17:34 UTC (rev 6271)
+++ mlton/trunk/runtime/gc/heap.c	2007-12-15 05:21:29 UTC (rev 6272)
@@ -341,11 +341,11 @@
       GC_diskBack_close (data);
       if (s->controls.messages)
         GC_displayMem ();
-      die ("Out of memory.  Unable to allocate %s bytes.\n",
+      die ("Out of memory.  Unable to allocate heap with %s bytes.\n",
            uintmaxToCommaString(minSize));
     }
   } else {
-    die ("Out of memory.  Unable to allocate %s bytes.\n",
+    die ("Out of memory.  Unable to allocate heap with %s bytes.\n",
          uintmaxToCommaString(minSize));
   }
 done:




More information about the MLton-commit mailing list