diff options
author | simonmar@microsoft.com <unknown> | 2008-01-30 15:07:30 +0000 |
---|---|---|
committer | simonmar@microsoft.com <unknown> | 2008-01-30 15:07:30 +0000 |
commit | faafd34db3f4306b9165d99676f4680dd85b96d4 (patch) | |
tree | d746be9cc5c29c24a3ecfa4b98f335d9a6231009 /rts/sm/Storage.c | |
parent | 1231d33279f25e931bcac1bac046b0f839290d61 (diff) | |
download | haskell-faafd34db3f4306b9165d99676f4680dd85b96d4.tar.gz |
calcNeeded: fix the calculation, we weren't counting G0 step 1
Diffstat (limited to 'rts/sm/Storage.c')
-rw-r--r-- | rts/sm/Storage.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 0bc15c075e..8b3839f8a8 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -999,10 +999,11 @@ calcNeeded(void) for (s = 0; s < generations[g].n_steps; s++) { if (g == 0 && s == 0) { continue; } stp = &generations[g].steps[s]; - if (generations[g].steps[0].n_blocks + - generations[g].steps[0].n_large_blocks - > generations[g].max_blocks - && stp->is_compacted == 0) { + if (g == 0 || // always collect gen 0 + (generations[g].steps[0].n_blocks + + generations[g].steps[0].n_large_blocks + > generations[g].max_blocks + && stp->is_compacted == 0)) { needed += 2 * stp->n_blocks + stp->n_large_blocks; } else { needed += stp->n_blocks + stp->n_large_blocks; |