diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-22 15:28:03 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-22 15:28:03 -0300 |
commit | 74123e96869bdb55d3967036e2bc0c6f9e0550d6 (patch) | |
tree | 06b60d23fb253c8ff1c640f34e15424455737395 /lstate.h | |
parent | 9c196bebad4f84ffb43f0ef1e19792cc4b795704 (diff) | |
download | lua-74123e96869bdb55d3967036e2bc0c6f9e0550d6.tar.gz lua-74123e96869bdb55d3967036e2bc0c6f9e0550d6.tar.bz2 lua-74123e96869bdb55d3967036e2bc0c6f9e0550d6.zip |
draft version of a generational mode for garbage collection. (Not well
tested; no major collections; ...)
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.53 2010/02/09 11:55:37 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.54 2010/03/13 15:55:42 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 | */ |
@@ -58,6 +58,7 @@ struct lua_longjmp; /* defined in ldo.c */ | |||
58 | #define KGC_NORMAL 0 | 58 | #define KGC_NORMAL 0 |
59 | #define KGC_FORCED 1 /* gc was forced by the program */ | 59 | #define KGC_FORCED 1 /* gc was forced by the program */ |
60 | #define KGC_EMERGENCY 2 /* gc was forced by an allocation failure */ | 60 | #define KGC_EMERGENCY 2 /* gc was forced by an allocation failure */ |
61 | #define KGC_GEN 3 /* generational collection */ | ||
61 | 62 | ||
62 | 63 | ||
63 | typedef struct stringtable { | 64 | typedef struct stringtable { |
@@ -142,9 +143,9 @@ typedef struct global_State { | |||
142 | struct lua_State *mainthread; | 143 | struct lua_State *mainthread; |
143 | UpVal uvhead; /* head of double-linked list of all open upvalues */ | 144 | UpVal uvhead; /* head of double-linked list of all open upvalues */ |
144 | const lua_Number *version; /* pointer to version number */ | 145 | const lua_Number *version; /* pointer to version number */ |
145 | struct Table *mt[NUM_TAGS]; /* metatables for basic types */ | ||
146 | TString *tmname[TM_N]; /* array with tag-method names */ | ||
147 | TString *envn; /* environment variable name */ | 146 | TString *envn; /* environment variable name */ |
147 | TString *tmname[TM_N]; /* array with tag-method names */ | ||
148 | struct Table *mt[NUM_TAGS]; /* metatables for basic types */ | ||
148 | } global_State; | 149 | } global_State; |
149 | 150 | ||
150 | 151 | ||