diff options
author | simonmar@microsoft.com <unknown> | 2007-12-14 13:58:42 +0000 |
---|---|---|
committer | simonmar@microsoft.com <unknown> | 2007-12-14 13:58:42 +0000 |
commit | 2cf1115cd06678e5255c39e9fd56787031c31c06 (patch) | |
tree | 1a49a916a3269b5739f114f67978381fd5e7f59b /rts/Stats.c | |
parent | 8311cc9208c6d6e1d9ad0458dab62e49bd154ae2 (diff) | |
download | haskell-2cf1115cd06678e5255c39e9fd56787031c31c06.tar.gz |
calculate wastage due to unused memory at the end of each block
Diffstat (limited to 'rts/Stats.c')
-rw-r--r-- | rts/Stats.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/rts/Stats.c b/rts/Stats.c index 7059feb4a9..b9df019ab8 100644 --- a/rts/Stats.c +++ b/rts/Stats.c @@ -676,14 +676,10 @@ statDescribeGens(void) for (bd = step->large_objects, lge = 0; bd; bd = bd->link) { lge++; } - live = step->n_large_blocks * BLOCK_SIZE; - bd = step->blocks; // This live figure will be slightly less that the "live" figure // given by +RTS -Sstderr, because we take don't count the // slop at the end of each block. - for (; bd; bd = bd->link) { - live += (bd->free - bd->start) * sizeof(W_); - } + live += countOccupied(step->blocks) + countOccupied(step->large_objects); if (s != 0) { debugBelch("%36s",""); } |