[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / runtime / storage / Force_GC.lc
1 \section[Force_GC.lc]{Code for Forcing Garbage Collections}
2
3 \begin{code}
4 #include "rtsdefs.h"
5 \end{code}
6
7 Only have GC forcing if @FORCE_GC@ defined
8
9 - currently only works with appel GC
10 - in normal appel GC, if the force_gc flag is set *major* GC occurs
11   at the next scheduled minor GC if at least GCInterval word allocations have happened
12   since the last major GC.
13   (It also occurs when the normal conditions for a major GC is met)
14 - if the force2s and force_gc flags are set 
15   (forcing appel GC to work as a 2 space GC) GC occurs
16   at least at every GCInterval word allocations 
17   (it also occurs when the semi-space limit is reached).
18   Therefore it has no effect if the interval specified is >= semi-space.
19     
20
21 \begin{code}
22 #if defined(FORCE_GC)
23 \end{code}
24
25 \begin{code}
26 I_ force_GC = 0;     /* Global Flag */
27 I_ GCInterval = DEFAULT_GC_INTERVAL;    /* words alloced */
28 I_ alloc_since_last_major_GC = 0;    /* words alloced since last major GC */
29
30
31 #endif /* FORCE_GC */
32 \end{code}
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50