[project @ 1996-01-11 14:06:51 by partain]
[ghc-hetmet.git] / ghc / runtime / hooks / OutOfHeap.lc
index 22d2b4a..a1c6110 100644 (file)
@@ -2,10 +2,11 @@
 #include "rtsdefs.h"
 
 void
-OutOfHeapHook (request_size, heap_size)
+OutOfHeapHook (request_size)
   W_ request_size; /* in bytes */
-  W_ heap_size;    /* in bytes */
 {
+    W_ heap_size = RTSflags.GcFlags.heapSize * sizeof(W_); /* i.e., in bytes */
+
     fprintf(stderr, "Heap exhausted;\nwhile trying to allocate %lu bytes in a %lu-byte heap;\nuse `+RTS -H<size>' to increase the total heap size.\n",
        request_size,
        heap_size);