in instead of the defaults.
*/
+#include <string.h>
+
#if __GLASGOW_HASKELL__ >= 400
-#include "Rts.h"
+#include "../rts/Rts.h"
#else
#include "rtsdefs.h"
#endif
-#if __GLASGOW_HASKELL__ >= 408
+#if __GLASGOW_HASKELL__ >= 505
+#include "../rts/Rts.h"
#include "../includes/RtsFlags.h"
+#else
+#include "Rts.h"
+#include "RtsFlags.h"
+#endif
+
+#if __GLASGOW_HASKELL__ >= 502
+#include "RtsFlags.h"
+#endif
+
+#if __GLASGOW_HASKELL__ >= 408
#include "HsFFI.h"
#endif
#include <unistd.h>
#endif
+#if __GLASGOW_HASKELL__ >= 504
+
+char *ghc_rts_opts = "-H8m -K8m";
+
+#else
+
void
defaultsHook (void)
{
RtsFlags.GcFlags.statsFile = stderr;
#endif
}
+#endif
void
enableTimingStats( void ) /* called from the driver */
{
-#if __GLASGOW_HASKELL__ >= 411
+#if __GLASGOW_HASKELL__ >= 505
RtsFlags.GcFlags.giveStats = ONELINE_GC_STATS;
#endif
/* ignored when bootstrapping with an older GHC */
#endif
}
-#if __GLASGOW_HASKELL__ >= 400
void
OutOfHeapHook (unsigned long request_size, unsigned long heap_size)
/* both in bytes */
fprintf(stderr, "GHC stack-space overflow: current size %ld bytes.\nUse the `-K<size>' option to increase it.\n", stack_size);
}
-#else /* GHC < 4.00 */
-
-void
-OutOfHeapHook (W_ request_size, W_ heap_size) /* both in bytes */
-{
- fprintf(stderr, "GHC's heap exhausted;\nwhile trying to allocate %lu bytes in a %lu-byte heap;\nuse the `-H<size>' option to increase the total heap size.\n",
- request_size,
- heap_size);
-}
-
-void
-StackOverflowHook (I_ stack_size) /* in bytes */
-{
- fprintf(stderr, "GHC stack-space overflow: current size %ld bytes.\nUse the `-K<size>' option to increase it.\n", stack_size);
-}
-
-#endif
-
HsInt
ghc_strlen( HsAddr a )
{