copyright updates and add Commentary links
[ghc.git] / rts / sm / GC.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team 1998-2006
4 *
5 * Generational garbage collector
6 *
7 * Documentation on the architecture of the Garbage Collector can be
8 * found in the online commentary:
9 *
10 * http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/GC
11 *
12 * ---------------------------------------------------------------------------*/
13
14 #ifndef GC_H
15 #define GC_H
16
17 extern nat N;
18 extern rtsBool major_gc;
19 extern nat evac_gen;
20 extern rtsBool eager_promotion;
21 extern rtsBool failed_to_evac;
22
23 extern StgClosure* static_objects;
24 extern StgClosure* scavenged_static_objects;
25
26 extern bdescr *mark_stack_bdescr;
27 extern StgPtr *mark_stack;
28 extern StgPtr *mark_sp;
29 extern StgPtr *mark_splim;
30
31 extern rtsBool mark_stack_overflowed;
32 extern bdescr *oldgen_scan_bd;
33 extern StgPtr oldgen_scan;
34
35 extern lnat new_blocks; // blocks allocated during this GC
36 extern lnat new_scavd_blocks; // ditto, but depth-first blocks
37
38 #ifdef DEBUG
39 extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_OTHERS;
40 #endif
41
42 StgClosure * isAlive(StgClosure *p);
43
44 #endif /* GC_H */