Revert "'DynFlag'-free version of 'mkParserFlags'"
[ghc.git] / compiler / parser / cutils.c
1 /*
2 These utility routines are used various
3 places in the GHC library.
4 */
5
6 #include "Rts.h"
7
8 #include "HsFFI.h"
9
10 #include <string.h>
11
12 #if defined(HAVE_UNISTD_H)
13 #include <unistd.h>
14 #endif
15
16 void
17 enableTimingStats( void ) /* called from the driver */
18 {
19 RtsFlags.GcFlags.giveStats = ONELINE_GC_STATS;
20 }
21
22 void
23 setHeapSize( HsInt size )
24 {
25 RtsFlags.GcFlags.heapSizeSuggestion = size / BLOCK_SIZE;
26 if (RtsFlags.GcFlags.maxHeapSize != 0 &&
27 RtsFlags.GcFlags.heapSizeSuggestion > RtsFlags.GcFlags.maxHeapSize) {
28 RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion;
29 }
30 }