summaryrefslogtreecommitdiff
path: root/includes/rts/storage/Block.h
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-12-03 15:07:28 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-12-03 15:07:28 +0000
commit214b3663d5d7598c13643f9221e43d5a7735b47f (patch)
treede779bab8dbcf057eaf481e6b612b63881e246e9 /includes/rts/storage/Block.h
parent7cb1d9274e84ee2fc2dd610aa4f7686586ca0357 (diff)
downloadhaskell-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 'includes/rts/storage/Block.h')
-rw-r--r--includes/rts/storage/Block.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/rts/storage/Block.h b/includes/rts/storage/Block.h
index e99a03e76c..3114bea014 100644
--- a/includes/rts/storage/Block.h
+++ b/includes/rts/storage/Block.h
@@ -57,8 +57,8 @@ typedef struct bdescr_ {
StgPtr scan; /* scan pointer for copying GC */
} u;
- struct step_ *step; /* step */
- struct step_ *dest; /* destination step */
+ struct generation_ *gen; /* generation */
+ struct generation_ *dest; /* destination gen */
StgWord32 blocks; /* no. of blocks (if grp head, 0 otherwise) */