diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-24 13:59:26 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-24 13:59:26 -0300 |
| commit | 69371c4b84becac09c445aae01d005b49658ef82 (patch) | |
| tree | 03b0b5df405dbd77b481e98ccd67d46c166d492b /lstate.h | |
| parent | 6a98aa0bb0426acdf4a9ef75b1d3200fd972e77d (diff) | |
| download | lua-69371c4b84becac09c445aae01d005b49658ef82.tar.gz lua-69371c4b84becac09c445aae01d005b49658ef82.tar.bz2 lua-69371c4b84becac09c445aae01d005b49658ef82.zip | |
'KGC_NORMAL' -> 'KGC_INC' + emergency GC signalled by flag (instead
of mode)
Diffstat (limited to 'lstate.h')
| -rw-r--r-- | lstate.h | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.h,v 2.137 2017/04/11 18:41:09 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.138 2017/04/19 17:02:50 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 | */ |
| @@ -69,9 +69,8 @@ struct lua_longjmp; /* defined in ldo.c */ | |||
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | /* kinds of Garbage Collection */ | 71 | /* kinds of Garbage Collection */ |
| 72 | #define KGC_NORMAL 0 | 72 | #define KGC_INC 0 /* incremental gc */ |
| 73 | #define KGC_GEN 1 /* generational gc */ | 73 | #define KGC_GEN 1 /* generational gc */ |
| 74 | #define KGC_EMERGENCY 2 /* gc was forced by an allocation failure */ | ||
| 75 | 74 | ||
| 76 | 75 | ||
| 77 | typedef struct stringtable { | 76 | typedef struct stringtable { |
| @@ -151,6 +150,7 @@ typedef struct global_State { | |||
| 151 | lu_byte genminormul; /* control for minor generational collections */ | 150 | lu_byte genminormul; /* control for minor generational collections */ |
| 152 | lu_byte genmajormul; /* control for major generational collections */ | 151 | lu_byte genmajormul; /* control for major generational collections */ |
| 153 | lu_byte gcrunning; /* true if GC is running */ | 152 | lu_byte gcrunning; /* true if GC is running */ |
| 153 | lu_byte gcemergency; /* true if this is an emergency collection */ | ||
| 154 | GCObject *allgc; /* list of all collectable objects */ | 154 | GCObject *allgc; /* list of all collectable objects */ |
| 155 | GCObject **sweepgc; /* current position of sweep in list */ | 155 | GCObject **sweepgc; /* current position of sweep in list */ |
| 156 | GCObject *finobj; /* list of collectable objects with finalizers */ | 156 | GCObject *finobj; /* list of collectable objects with finalizers */ |
