blob: fb4381dc0b150cedf4e7e54d7bc70cef3b15255b (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/* -----------------------------------------------------------------------------
*
* (c) The GHC Team 1998-2008
*
* Generational garbage collector
*
* Documentation on the architecture of the Garbage Collector can be
* found in the online commentary:
*
* http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/GC
*
* ---------------------------------------------------------------------------*/
#ifndef GC_H
#define GC_H
extern nat N;
extern rtsBool major_gc;
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 long copied;
extern rtsBool work_stealing;
#ifdef DEBUG
extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS;
#endif
#ifdef THREADED_RTS
extern SpinLock gc_alloc_block_sync;
#endif
#if defined(PROF_SPIN) && defined(THREADED_RTS)
extern StgWord64 whitehole_spin;
#endif
void gcWorkerThread (Capability *cap);
void initGcThreads (void);
void freeGcThreads (void);
void waitForGcThreads (Capability *cap);
void releaseGCThreads (Capability *cap);
#define WORK_UNIT_WORDS 128
#endif /* GC_H */
|