[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / rts / hooks / StackOverflow.c
diff --git a/ghc/rts/hooks/StackOverflow.c b/ghc/rts/hooks/StackOverflow.c
new file mode 100644 (file)
index 0000000..a467502
--- /dev/null
@@ -0,0 +1,15 @@
+/* -----------------------------------------------------------------------------
+ * $Id: StackOverflow.c,v 1.2 1998/12/02 13:29:15 simonm Exp $
+ *
+ * User-overridable RTS hooks.
+ *
+ * ---------------------------------------------------------------------------*/
+
+#include "Rts.h"
+
+void
+StackOverflowHook (lnat stack_size)    /* in bytes */
+{
+    fprintf(stderr, "Stack space overflow: current size %ld bytes.\nUse `+RTS -Ksize' to increase it.\n", stack_size);
+}
+