diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-08-30 10:44:44 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-08-30 10:44:44 -0300 |
commit | 0b062414831e3794fcdb747e53e9662d112473cf (patch) | |
tree | 002d75be5a52689a232e44787b2964d8c8e29b9c /lgc.h | |
parent | 857253cdfcddf4f49c7cec15791f948d1d7612bb (diff) | |
download | lua-0b062414831e3794fcdb747e53e9662d112473cf.tar.gz lua-0b062414831e3794fcdb747e53e9662d112473cf.tar.bz2 lua-0b062414831e3794fcdb747e53e9662d112473cf.zip |
better control for GC cycles
Diffstat (limited to 'lgc.h')
-rw-r--r-- | lgc.h | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.h,v 2.6 2004/08/10 19:17:23 roberto Exp roberto $ | 2 | ** $Id: lgc.h,v 2.7 2004/08/24 20:12:06 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -14,10 +14,11 @@ | |||
14 | /* | 14 | /* |
15 | ** Possible states of the Garbage Collector | 15 | ** Possible states of the Garbage Collector |
16 | */ | 16 | */ |
17 | #define GCSpropagate 0 | 17 | #define GCSpause 0 |
18 | #define GCSsweepstring 1 | 18 | #define GCSpropagate 1 |
19 | #define GCSsweep 2 | 19 | #define GCSsweepstring 2 |
20 | #define GCSfinalize 3 | 20 | #define GCSsweep 3 |
21 | #define GCSfinalize 4 | ||
21 | 22 | ||
22 | 23 | ||
23 | /* | 24 | /* |
@@ -71,7 +72,7 @@ | |||
71 | #define luaC_white(g) cast(lu_byte, (g)->currentwhite) | 72 | #define luaC_white(g) cast(lu_byte, (g)->currentwhite) |
72 | 73 | ||
73 | 74 | ||
74 | #define luaC_checkGC(L) { if (G(L)->nblocks >= G(L)->GCthreshold) \ | 75 | #define luaC_checkGC(L) { if (G(L)->totalbytes >= G(L)->GCthreshold) \ |
75 | luaC_step(L); } | 76 | luaC_step(L); } |
76 | 77 | ||
77 | 78 | ||