summaryrefslogtreecommitdiff
path: root/rts/sm/GC.h
blob: 519925e452d90d98b44d3a7aa8f71728def3d801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team 1998-2006
 *
 * Generational garbage collector
 *
 * ---------------------------------------------------------------------------*/

#ifndef GC_H
#define GC_H

extern nat N;
extern rtsBool major_gc;
extern nat evac_gen;
extern rtsBool eager_promotion;
extern rtsBool failed_to_evac;

extern StgClosure* static_objects;
extern StgClosure* scavenged_static_objects;

extern bdescr *mark_stack_bdescr;
extern StgPtr *mark_stack;
extern StgPtr *mark_sp;
extern StgPtr *mark_splim;

extern rtsBool mark_stack_overflowed;
extern bdescr *oldgen_scan_bd;
extern StgPtr  oldgen_scan;

extern lnat new_blocks;		 // blocks allocated during this GC 
extern lnat new_scavd_blocks;	 // ditto, but depth-first blocks

#ifdef DEBUG
extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_OTHERS;
#endif

StgClosure * isAlive(StgClosure *p);

#endif /* GC_H */