diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-21 17:09:51 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-21 17:09:51 -0300 |
commit | 0df6635711230ab306710056f621b6da59fac5ea (patch) | |
tree | d8ae245fc35157219a54407d9af6a52b42922ce1 /lstate.h | |
parent | ae800656c9f82b54f6fae1497022d3484ad0c920 (diff) | |
download | lua-0df6635711230ab306710056f621b6da59fac5ea.tar.gz lua-0df6635711230ab306710056f621b6da59fac5ea.tar.bz2 lua-0df6635711230ab306710056f621b6da59fac5ea.zip |
"fixed" objects kept in a separated list (instead of being kept in
'allgc' list with a bit marking them)
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.85 2013/08/20 17:46:34 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.86 2013/08/21 19:21:16 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -24,6 +24,9 @@ | |||
24 | ** at the end of the 'allgc' list, after the 'l_registry' (which is | 24 | ** at the end of the 'allgc' list, after the 'l_registry' (which is |
25 | ** the first object to be added to the list). | 25 | ** the first object to be added to the list). |
26 | ** | 26 | ** |
27 | ** List 'fixedgc' keep objects that are not to be collected (currently | ||
28 | ** only small strings, such as reserved words). | ||
29 | ** | ||
27 | ** Open upvalues are not subject to independent garbage collection. They | 30 | ** Open upvalues are not subject to independent garbage collection. They |
28 | ** are collected together with their respective threads. (They are | 31 | ** are collected together with their respective threads. (They are |
29 | ** always gray, so they must be remarked in the atomic step. Usually | 32 | ** always gray, so they must be remarked in the atomic step. Usually |
@@ -132,6 +135,7 @@ typedef struct global_State { | |||
132 | GCObject *ephemeron; /* list of ephemeron tables (weak keys) */ | 135 | GCObject *ephemeron; /* list of ephemeron tables (weak keys) */ |
133 | GCObject *allweak; /* list of all-weak tables */ | 136 | GCObject *allweak; /* list of all-weak tables */ |
134 | GCObject *tobefnz; /* list of userdata to be GC */ | 137 | GCObject *tobefnz; /* list of userdata to be GC */ |
138 | GCObject *fixedgc; /* list of objects not to be collected */ | ||
135 | Mbuffer buff; /* temporary buffer for string concatenation */ | 139 | Mbuffer buff; /* temporary buffer for string concatenation */ |
136 | int gcpause; /* size of pause between successive GCs */ | 140 | int gcpause; /* size of pause between successive GCs */ |
137 | int gcstepmul; /* GC `granularity' */ | 141 | int gcstepmul; /* GC `granularity' */ |