X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2Fsm%2FStorage.c;h=4498bda299711fcea3c32c016aa0e303a1f5b804;hp=d9c7f8627829f79927fe9c4eeed8b88584083cf5;hb=a0ca27ac659bcbe0c291b3bd1a12a965f43f5f55;hpb=5f9075dae09b9c7eff4cdf8d3fc339ea0d909d57 diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index d9c7f86..4498bda 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -79,6 +79,7 @@ initGeneration (generation *gen, int g) gen->n_old_blocks = 0; gen->large_objects = NULL; gen->n_large_blocks = 0; + gen->n_new_large_blocks = 0; gen->mut_list = allocBlock(); gen->scavenged_large_objects = NULL; gen->n_scavenged_large_blocks = 0; @@ -567,6 +568,7 @@ allocate (Capability *cap, lnat n) bd = allocGroup(req_blocks); dbl_link_onto(bd, &g0->large_objects); g0->n_large_blocks += bd->blocks; // might be larger than req_blocks + g0->n_new_large_blocks += bd->blocks; RELEASE_SM_LOCK; initBdescr(bd, g0, g0); bd->flags = BF_LARGE; @@ -666,6 +668,7 @@ allocatePinned (Capability *cap, lnat n) cap->pinned_object_block = bd = allocBlock(); dbl_link_onto(bd, &g0->large_objects); g0->n_large_blocks++; + g0->n_new_large_blocks++; RELEASE_SM_LOCK; initBdescr(bd, g0, g0); bd->flags = BF_PINNED | BF_LARGE; @@ -784,6 +787,8 @@ calcAllocated( void ) } } + allocated += g0->n_new_large_blocks * BLOCK_SIZE_W; + total_allocated += allocated; return allocated; }