rts: Make out-of-memory errors more consistent
authorBen Gamari <ben@smart-cactus.org>
Sun, 2 Apr 2017 23:15:45 +0000 (19:15 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 3 Apr 2017 01:13:09 +0000 (21:13 -0400)
This will make it a bit easier to maintain consistent output in the testsuite.

rts/hooks/OutOfHeap.c
rts/win32/OSMem.c
testsuite/tests/rts/overflow1.stderr
testsuite/tests/rts/overflow2.stderr
testsuite/tests/rts/overflow3.stderr

index 3058cdd..20d9809 100644 (file)
@@ -31,6 +31,6 @@ OutOfHeapHook (W_ request_size, W_ heap_size) /* both sizes in bytes */
 
         }
     } else {
-        errorBelch("Out of memory.\n");
+        errorBelch("Out of memory\n");
     }
 }
index 2a54235..ad72ffb 100644 (file)
@@ -74,7 +74,7 @@ allocNew(uint32_t n) {
         rec=0;
         if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) {
 
-            errorBelch("Out of memory");
+            errorBelch("Out of memory\n");
             stg_exit(EXIT_HEAPOVERFLOW);
         } else {
             sysErrorBelch(
index 77ef3ac..05ec796 100644 (file)
@@ -1,2 +1,2 @@
-overflow1: Out of memory.
+overflow1: Out of memory
 
index 0e57a8e..9f6cb3b 100644 (file)
@@ -1,2 +1,2 @@
-overflow2: Out of memory.
+overflow2: Out of memory
 
index aec2225..0526169 100644 (file)
@@ -1,2 +1,2 @@
-overflow3: Out of memory.
+overflow3: Out of memory