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 void enableTimingStats(void)11enableTimingStats( void ) /* called from the driver */ 12 { 13 RtsFlags.GcFlags.giveStats = ONELINE_GC_STATS; 14 } 15 16 void setHeapSize(HsInt size)17setHeapSize( HsInt size ) 18 { 19 RtsFlags.GcFlags.heapSizeSuggestion = size / BLOCK_SIZE; 20 if (RtsFlags.GcFlags.maxHeapSize != 0 && 21 RtsFlags.GcFlags.heapSizeSuggestion > RtsFlags.GcFlags.maxHeapSize) { 22 RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion; 23 } 24 } 25