1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team 1998-2008
5 * Generational garbage collector
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 * ---------------------------------------------------------------------------*/
18 extern rtsBool major_gc;
20 extern bdescr *mark_stack_bdescr;
21 extern StgPtr *mark_stack;
22 extern StgPtr *mark_sp;
23 extern StgPtr *mark_splim;
25 extern rtsBool mark_stack_overflowed;
26 extern bdescr *oldgen_scan_bd;
27 extern StgPtr oldgen_scan;
31 extern rtsBool work_stealing;
34 extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS;
38 extern SpinLock gc_alloc_block_sync;
41 #if defined(PROF_SPIN) && defined(THREADED_RTS)
42 extern StgWord64 whitehole_spin;
45 void gcWorkerThread (Capability *cap);
46 void initGcThreads (void);
47 void waitForGcThreads (Capability *cap);
48 void releaseGCThreads (Capability *cap);
50 #define WORK_UNIT_WORDS 128