diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-11-29 10:37:08 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-11-29 10:37:08 -0300 |
| commit | d324a0ccf9e2511baf182dd981a8ee9835cee925 (patch) | |
| tree | 7cb36618c0cbafb4a0216a117fd25a78250991a5 /lstate.h | |
| parent | 152b51955aabb9dfb32302569fac810e999eda03 (diff) | |
| download | lua-d324a0ccf9e2511baf182dd981a8ee9835cee925.tar.gz lua-d324a0ccf9e2511baf182dd981a8ee9835cee925.tar.bz2 lua-d324a0ccf9e2511baf182dd981a8ee9835cee925.zip | |
Simpler control for major collections
Diffstat (limited to 'lstate.h')
| -rw-r--r-- | lstate.h | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -145,12 +145,13 @@ struct lua_longjmp; /* defined in ldo.c */ | |||
| 145 | /* kinds of Garbage Collection */ | 145 | /* kinds of Garbage Collection */ |
| 146 | #define KGC_INC 0 /* incremental gc */ | 146 | #define KGC_INC 0 /* incremental gc */ |
| 147 | #define KGC_GEN 1 /* generational gc */ | 147 | #define KGC_GEN 1 /* generational gc */ |
| 148 | #define KGC_GENMAJOR 2 /* generational in "major" mode */ | ||
| 148 | 149 | ||
| 149 | 150 | ||
| 150 | typedef struct stringtable { | 151 | typedef struct stringtable { |
| 151 | TString **hash; | 152 | TString **hash; /* array of buckets (linked lists of strings) */ |
| 152 | int nuse; /* number of elements */ | 153 | int nuse; /* number of elements */ |
| 153 | int size; | 154 | int size; /* number of buckets */ |
| 154 | } stringtable; | 155 | } stringtable; |
| 155 | 156 | ||
| 156 | 157 | ||
| @@ -253,8 +254,7 @@ typedef struct global_State { | |||
| 253 | l_obj totalobjs; /* total number of objects allocated - GCdebt */ | 254 | l_obj totalobjs; /* total number of objects allocated - GCdebt */ |
| 254 | l_obj GCdebt; /* bytes allocated not yet compensated by the collector */ | 255 | l_obj GCdebt; /* bytes allocated not yet compensated by the collector */ |
| 255 | l_obj marked; /* number of objects marked in a GC cycle */ | 256 | l_obj marked; /* number of objects marked in a GC cycle */ |
| 256 | lu_mem GCestimate; /* an estimate of the non-garbage memory in use */ | 257 | l_obj GClastmajor; /* objects at last major collection */ |
| 257 | lu_mem lastatomic; /* see function 'genstep' in file 'lgc.c' */ | ||
| 258 | stringtable strt; /* hash table for strings */ | 258 | stringtable strt; /* hash table for strings */ |
| 259 | TValue l_registry; | 259 | TValue l_registry; |
| 260 | TValue nilvalue; /* a nil value */ | 260 | TValue nilvalue; /* a nil value */ |
