diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-12-03 15:07:28 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-12-03 15:07:28 +0000 |
commit | 214b3663d5d7598c13643f9221e43d5a7735b47f (patch) | |
tree | de779bab8dbcf057eaf481e6b612b63881e246e9 /rts/sm/Sweep.h | |
parent | 7cb1d9274e84ee2fc2dd610aa4f7686586ca0357 (diff) | |
download | haskell-214b3663d5d7598c13643f9221e43d5a7735b47f.tar.gz |
GC refactoring, remove "steps"
The GC had a two-level structure, G generations each of T steps.
Steps are for aging within a generation, mostly to avoid premature
promotion.
Measurements show that more than 2 steps is almost never worthwhile,
and 1 step is usually worse than 2. In theory fractional steps are
possible, so the ideal number of steps is somewhere between 1 and 3.
GHC's default has always been 2.
We can implement 2 steps quite straightforwardly by having each block
point to the generation to which objects in that block should be
promoted, so blocks in the nursery point to generation 0, and blocks
in gen 0 point to gen 1, and so on.
This commit removes the explicit step structures, merging generations
with steps, thus simplifying a lot of code. Performance is
unaffected. The tunable number of steps is now gone, although it may
be replaced in the future by a way to tune the aging in generation 0.
Diffstat (limited to 'rts/sm/Sweep.h')
-rw-r--r-- | rts/sm/Sweep.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/sm/Sweep.h b/rts/sm/Sweep.h index f540cb3509..4eacd11eef 100644 --- a/rts/sm/Sweep.h +++ b/rts/sm/Sweep.h @@ -14,6 +14,6 @@ #ifndef SM_SWEEP_H #define SM_SWEEP_H -RTS_PRIVATE void sweep(step *gen); +RTS_PRIVATE void sweep(generation *gen); #endif /* SM_SWEEP_H */ |