2 These utility routines are used various
3 places in the GHC library.
18 Calling 'strlen' and 'memcpy' directly gives problems with GCC's inliner,
19 and causes gcc to require too many registers on x84
23 ghc_strlen( HsAddr a )
25 return (strlen((char *)a));
29 ghc_memcmp( HsAddr a1, HsAddr a2, HsInt len )
31 return (memcmp((char *)a1, a2, len));
35 ghc_memcmp_off( HsAddr a1, HsInt i, HsAddr a2, HsInt len )
37 return (memcmp((char *)a1 + i, a2, len));
41 enableTimingStats( void ) /* called from the driver */
43 RtsFlags.GcFlags.giveStats = ONELINE_GC_STATS;
47 setHeapSize( HsInt size )
49 RtsFlags.GcFlags.heapSizeSuggestion = size / BLOCK_SIZE;
50 if (RtsFlags.GcFlags.maxHeapSize != 0 &&
51 RtsFlags.GcFlags.heapSizeSuggestion > RtsFlags.GcFlags.maxHeapSize) {
52 RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion;