diff options
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -251,8 +251,8 @@ typedef struct global_State { | |||
251 | lua_Alloc frealloc; /* function to reallocate memory */ | 251 | lua_Alloc frealloc; /* function to reallocate memory */ |
252 | void *ud; /* auxiliary data to 'frealloc' */ | 252 | void *ud; /* auxiliary data to 'frealloc' */ |
253 | lu_mem totalbytes; /* number of bytes currently allocated */ | 253 | lu_mem totalbytes; /* number of bytes currently allocated */ |
254 | l_obj totalobjs; /* total number of objects allocated - GCdebt */ | 254 | l_obj totalobjs; /* total number of objects allocated + GCdebt */ |
255 | l_obj GCdebt; /* bytes allocated not yet compensated by the collector */ | 255 | l_obj GCdebt; /* objects counted but not yet allocated */ |
256 | l_obj marked; /* number of objects marked in a GC cycle */ | 256 | l_obj marked; /* number of objects marked in a GC cycle */ |
257 | l_obj GClastmajor; /* objects at last major collection */ | 257 | l_obj GClastmajor; /* objects at last major collection */ |
258 | stringtable strt; /* hash table for strings */ | 258 | stringtable strt; /* hash table for strings */ |
@@ -388,7 +388,7 @@ union GCUnion { | |||
388 | 388 | ||
389 | 389 | ||
390 | /* actual number of total objects allocated */ | 390 | /* actual number of total objects allocated */ |
391 | #define gettotalobjs(g) ((g)->totalobjs + (g)->GCdebt) | 391 | #define gettotalobjs(g) ((g)->totalobjs - (g)->GCdebt) |
392 | 392 | ||
393 | 393 | ||
394 | LUAI_FUNC void luaE_setdebt (global_State *g, l_obj debt); | 394 | LUAI_FUNC void luaE_setdebt (global_State *g, l_obj debt); |