[project @ 1999-05-13 17:30:50 by simonm]
[ghc-hetmet.git] / ghc / rts / RtsUtils.c
index b9f2ff9..aab8a38 100644 (file)
@@ -1,5 +1,7 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsUtils.c,v 1.5 1999/01/29 09:30:51 simonm Exp $
+ * $Id: RtsUtils.c,v 1.8 1999/03/17 13:19:23 simonm Exp $
+ *
+ * (c) The GHC Team, 1998-1999
  *
  * General utility functions used in the RTS.
  *
@@ -33,6 +35,7 @@ void barf(char *s, ...)
   }
   vfprintf(stderr, s, ap);
   fprintf(stderr, "\n");
+  fflush(stderr);
   stg_exit(EXIT_FAILURE);
 }
 
@@ -109,16 +112,13 @@ raiseError( StgStablePtr handler STG_UNUSED )
    -------------------------------------------------------------------------- */
 
 void
-stackOverflow(nat max_stack_size)
+stackOverflow(void)
 {
-    fflush(stdout);
-    StackOverflowHook(max_stack_size * sizeof(W_)); /*msg*/
+    StackOverflowHook(RtsFlags.GcFlags.maxStkSize * sizeof(W_));
 
 #if defined(TICKY_TICKY)
     if (RtsFlags.TickyFlags.showTickyStats) PrintTickyInfo();
 #endif
-
-    stg_exit(EXIT_FAILURE);
 }
 
 void