diff options
Diffstat (limited to 'rts/sm/GC.c')
-rw-r--r-- | rts/sm/GC.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 6098e7955c..52bf199175 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -102,7 +102,7 @@ rtsBool major_gc; /* Data used for allocation area sizing. */ -static lnat g0_pcnt_kept = 30; // percentage of g0 live at last minor GC +static W_ g0_pcnt_kept = 30; // percentage of g0 live at last minor GC /* Mut-list stats */ #ifdef DEBUG @@ -149,7 +149,7 @@ static StgWord dec_running (void); static void wakeup_gc_threads (nat me); static void shutdown_gc_threads (nat me); static void collect_gct_blocks (void); -static lnat collect_pinned_object_blocks (void); +static StgWord collect_pinned_object_blocks (void); #if 0 && defined(DEBUG) static void gcCAFs (void); @@ -179,7 +179,7 @@ GarbageCollect (nat collect_gen, { bdescr *bd; generation *gen; - lnat live_blocks, live_words, allocated, par_max_copied, par_tot_copied; + StgWord live_blocks, live_words, allocated, par_max_copied, par_tot_copied; #if defined(THREADED_RTS) gc_thread *saved_gct; #endif @@ -1275,14 +1275,14 @@ prepare_collected_gen (generation *gen) // for a compacted generation, we need to allocate the bitmap if (gen->mark) { - lnat bitmap_size; // in bytes + StgWord bitmap_size; // in bytes bdescr *bitmap_bdescr; StgWord *bitmap; bitmap_size = gen->n_old_blocks * BLOCK_SIZE / (sizeof(W_)*BITS_PER_BYTE); - + if (bitmap_size > 0) { - bitmap_bdescr = allocGroup((lnat)BLOCK_ROUND_UP(bitmap_size) + bitmap_bdescr = allocGroup((StgWord)BLOCK_ROUND_UP(bitmap_size) / BLOCK_SIZE); gen->bitmap = bitmap_bdescr; bitmap = bitmap_bdescr->start; @@ -1405,12 +1405,12 @@ collect_gct_blocks (void) purposes. -------------------------------------------------------------------------- */ -static lnat +static StgWord collect_pinned_object_blocks (void) { nat n; bdescr *bd, *prev; - lnat allocated = 0; + StgWord allocated = 0; for (n = 0; n < n_capabilities; n++) { prev = NULL; @@ -1510,8 +1510,8 @@ resize_generations (void) nat g; if (major_gc && RtsFlags.GcFlags.generations > 1) { - lnat live, size, min_alloc, words; - const nat max = RtsFlags.GcFlags.maxHeapSize; + W_ live, size, min_alloc, words; + const nat max = RtsFlags.GcFlags.maxHeapSize; const nat gens = RtsFlags.GcFlags.generations; // live in the oldest generations @@ -1604,7 +1604,7 @@ resize_generations (void) static void resize_nursery (void) { - const lnat min_nursery = RtsFlags.GcFlags.minAllocAreaSize * n_capabilities; + const StgWord min_nursery = RtsFlags.GcFlags.minAllocAreaSize * n_capabilities; if (RtsFlags.GcFlags.generations == 1) { // Two-space collector: @@ -1664,7 +1664,7 @@ resize_nursery (void) if (RtsFlags.GcFlags.heapSizeSuggestion) { long blocks; - lnat needed; + StgWord needed; calcNeeded(rtsFalse, &needed); // approx blocks needed at next GC |