diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-24 10:07:01 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-24 10:07:01 -0300 |
commit | 4433dbb5f5ac0bb6118bc49ddf061f194c070814 (patch) | |
tree | 628f9da77c0cf6a80556a9c189f2528a3d7d7ca4 /lgc.h | |
parent | 5cb128ea540b33dbc6be659d5dfc3c64c57d78d9 (diff) | |
download | lua-4433dbb5f5ac0bb6118bc49ddf061f194c070814.tar.gz lua-4433dbb5f5ac0bb6118bc49ddf061f194c070814.tar.bz2 lua-4433dbb5f5ac0bb6118bc49ddf061f194c070814.zip |
userdata with finalizers are kept in a separated list ('udgc'), instead
of at the end of 'rootgc' (which was renamed to 'allgc', as it is not
"root" in the usual meaning for collectors)
Diffstat (limited to 'lgc.h')
-rw-r--r-- | lgc.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.h,v 2.26 2009/12/11 21:31:14 roberto Exp roberto $ | 2 | ** $Id: lgc.h,v 2.27 2009/12/16 16:42:58 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 | */ |
@@ -18,8 +18,9 @@ | |||
18 | #define GCSpropagate 1 | 18 | #define GCSpropagate 1 |
19 | #define GCSatomic 2 | 19 | #define GCSatomic 2 |
20 | #define GCSsweepstring 3 | 20 | #define GCSsweepstring 3 |
21 | #define GCSsweep 4 | 21 | #define GCSsweepudata 4 |
22 | #define GCSfinalize 5 | 22 | #define GCSsweep 5 |
23 | #define GCSfinalize 6 | ||
23 | 24 | ||
24 | 25 | ||
25 | 26 | ||
@@ -45,12 +46,10 @@ | |||
45 | ** bit 1 - object is white (type 1) | 46 | ** bit 1 - object is white (type 1) |
46 | ** bit 2 - object is black | 47 | ** bit 2 - object is black |
47 | ** bit 3 - for userdata: has been finalized | 48 | ** bit 3 - for userdata: has been finalized |
48 | ** bit 4 - for userdata: it's in 2nd part of rootgc list or in tobefnz | 49 | ** bit 4 - for userdata: it's in 'udgc' list or in 'tobefnz' |
49 | ** bit 5 - object is fixed (should not be collected) | 50 | ** bit 5 - object is fixed (should not be collected) |
50 | ** bit 6 - object is "super" fixed (only the main thread) | 51 | ** bit 6 - object is "super" fixed (only the main thread) |
51 | */ | 52 | */ |
52 | |||
53 | |||
54 | #define WHITE0BIT 0 | 53 | #define WHITE0BIT 0 |
55 | #define WHITE1BIT 1 | 54 | #define WHITE1BIT 1 |
56 | #define BLACKBIT 2 | 55 | #define BLACKBIT 2 |
@@ -58,6 +57,7 @@ | |||
58 | #define SEPARATED 4 | 57 | #define SEPARATED 4 |
59 | #define FIXEDBIT 5 | 58 | #define FIXEDBIT 5 |
60 | #define SFIXEDBIT 6 | 59 | #define SFIXEDBIT 6 |
60 | |||
61 | #define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT) | 61 | #define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT) |
62 | 62 | ||
63 | 63 | ||