diff options
Diffstat (limited to 'rts/hooks/StackOverflow.c')
-rw-r--r-- | rts/hooks/StackOverflow.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rts/hooks/StackOverflow.c b/rts/hooks/StackOverflow.c new file mode 100644 index 0000000000..a395a3a1a5 --- /dev/null +++ b/rts/hooks/StackOverflow.c @@ -0,0 +1,16 @@ +/* ----------------------------------------------------------------------------- + * + * User-overridable RTS hooks. + * + * ---------------------------------------------------------------------------*/ + +#include "Rts.h" + +#include <stdio.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); +} + |