Propagate scalar variables and tycons for vectorisation through 'HscTypes.VectInfo'.
[ghc-hetmet.git] / ghc / hschooks.c
1 /*
2 These routines customise the error messages
3 for various bits of the RTS.  They are linked
4 in instead of the defaults.
5 */
6
7 #include "Rts.h"
8
9 #include "HsFFI.h"
10
11 #include <string.h>
12
13 #ifdef HAVE_UNISTD_H
14 #include <unistd.h>
15 #endif
16
17 void
18 defaultsHook (void)
19 {
20     RtsFlags.GcFlags.heapSizeSuggestion = 6*1024*1024 / BLOCK_SIZE;
21     RtsFlags.GcFlags.maxStkSize         = 512*1024*1024 / sizeof(W_);
22     RtsFlags.GcFlags.giveStats = COLLECT_GC_STATS;
23
24     // See #3408: the default idle GC time of 0.3s is too short on
25     // Windows where we receive console events once per second or so.
26     RtsFlags.GcFlags.idleGCDelayTime = 5*1000;
27 }
28
29 void
30 StackOverflowHook (unsigned long stack_size)    /* in bytes */
31 {
32     fprintf(stderr, "GHC stack-space overflow: current limit is %ld bytes.\nUse the `-K<size>' option to increase it.\n", stack_size);
33 }
34