1 /* ----------------------------------------------------------------------------
3 * (c) The GHC Team 1998-2006
5 * Generational garbage collector: utilities
7 * Documentation on the architecture of the Garbage Collector can be
8 * found in the online commentary:
10 * http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/GC
12 * --------------------------------------------------------------------------*/
17 extern SpinLock gc_alloc_block_sync;
20 bdescr *allocBlock_sync(void);
22 void push_scan_block (bdescr *bd, step_workspace *ws);
23 bdescr *grab_todo_block (step_workspace *ws);
24 bdescr *gc_alloc_todo_block (step_workspace *ws);
25 bdescr *gc_alloc_scavd_block (step_workspace *ws);
27 // Returns true if a block is 3/4 full. This predicate is used to try
28 // to re-use partial blocks wherever possible, and to reduce wastage.
29 // We might need to tweak the actual value.
31 isPartiallyFull(bdescr *bd)
33 return (bd->free + BLOCK_SIZE_W/4 < bd->start + BLOCK_SIZE_W);
38 void printMutableList (generation *gen);