[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / runtime / hooks / OutOfHeap.lc
diff --git a/ghc/runtime/hooks/OutOfHeap.lc b/ghc/runtime/hooks/OutOfHeap.lc
new file mode 100644 (file)
index 0000000..22d2b4a
--- /dev/null
@@ -0,0 +1,13 @@
+\begin{code}
+#include "rtsdefs.h"
+
+void
+OutOfHeapHook (request_size, heap_size)
+  W_ request_size; /* in bytes */
+  W_ heap_size;    /* 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);
+}
+\end{code}