diff options
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -274,11 +274,10 @@ struct CallInfo { | |||
274 | typedef struct global_State { | 274 | typedef struct global_State { |
275 | lua_Alloc frealloc; /* function to reallocate memory */ | 275 | lua_Alloc frealloc; /* function to reallocate memory */ |
276 | void *ud; /* auxiliary data to 'frealloc' */ | 276 | void *ud; /* auxiliary data to 'frealloc' */ |
277 | lu_mem GCtotalbytes; /* number of bytes currently allocated */ | 277 | l_mem GCtotalbytes; /* number of bytes currently allocated + debt */ |
278 | l_obj GCtotalobjs; /* total number of objects allocated + GCdebt */ | 278 | l_mem GCdebt; /* bytes counted but not yet allocated */ |
279 | l_obj GCdebt; /* objects counted but not yet allocated */ | 279 | l_mem GCmarked; /* number of objects marked in a GC cycle */ |
280 | l_obj GCmarked; /* number of objects marked in a GC cycle */ | 280 | l_mem GCmajorminor; /* auxiliary counter to control major-minor shifts */ |
281 | l_obj GCmajorminor; /* auxiliary counter to control major-minor shifts */ | ||
282 | stringtable strt; /* hash table for strings */ | 281 | stringtable strt; /* hash table for strings */ |
283 | TValue l_registry; | 282 | TValue l_registry; |
284 | TValue nilvalue; /* a nil value */ | 283 | TValue nilvalue; /* a nil value */ |
@@ -411,11 +410,11 @@ union GCUnion { | |||
411 | #define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc)) | 410 | #define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc)) |
412 | 411 | ||
413 | 412 | ||
414 | /* actual number of total objects allocated */ | 413 | /* actual number of total memory allocated */ |
415 | #define gettotalobjs(g) ((g)->GCtotalobjs - (g)->GCdebt) | 414 | #define gettotalbytes(g) ((g)->GCtotalbytes - (g)->GCdebt) |
416 | 415 | ||
417 | 416 | ||
418 | LUAI_FUNC void luaE_setdebt (global_State *g, l_obj debt); | 417 | LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt); |
419 | LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1); | 418 | LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1); |
420 | LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L); | 419 | LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L); |
421 | LUAI_FUNC void luaE_shrinkCI (lua_State *L); | 420 | LUAI_FUNC void luaE_shrinkCI (lua_State *L); |