summaryrefslogtreecommitdiff
path: root/rts/sm
diff options
context:
space:
mode:
Diffstat (limited to 'rts/sm')
-rw-r--r--rts/sm/GC.c1
-rw-r--r--rts/sm/Storage.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index dc4c68fe75..99b0eccefa 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -649,6 +649,7 @@ SET_GCT(gc_threads[0]);
freeChain(gen->large_objects);
gen->large_objects = gen->scavenged_large_objects;
gen->n_large_blocks = gen->n_scavenged_large_blocks;
+ gen->n_new_large_blocks = 0;
ASSERT(countBlocks(gen->large_objects) == gen->n_large_blocks);
}
else // for generations > N
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index d9c7f86278..4498bda299 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;
}