aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-11-03 16:37:13 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-11-03 16:37:13 -0300
commit76953316d1283ab6324b59b914ef53a521408444 (patch)
tree41d34e962db7c645bd56f2dc688fe110d5df46a6 /lstate.h
parent3d2bd1359d17228b62752f6edae86b6a1579c6d4 (diff)
downloadlua-76953316d1283ab6324b59b914ef53a521408444.tar.gz
lua-76953316d1283ab6324b59b914ef53a521408444.tar.bz2
lua-76953316d1283ab6324b59b914ef53a521408444.zip
Added a counter of the total number of existing objects
It may simplify the control of the garbage collector.
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lstate.h b/lstate.h
index 2e907818..62ad61c6 100644
--- a/lstate.h
+++ b/lstate.h
@@ -250,6 +250,7 @@ typedef struct global_State {
250 lua_Alloc frealloc; /* function to reallocate memory */ 250 lua_Alloc frealloc; /* function to reallocate memory */
251 void *ud; /* auxiliary data to 'frealloc' */ 251 void *ud; /* auxiliary data to 'frealloc' */
252 l_mem totalbytes; /* number of bytes currently allocated - GCdebt */ 252 l_mem totalbytes; /* number of bytes currently allocated - GCdebt */
253 l_mem totalobjs; /* total number of objects allocated */
253 l_mem GCdebt; /* bytes allocated not yet compensated by the collector */ 254 l_mem GCdebt; /* bytes allocated not yet compensated by the collector */
254 lu_mem GCestimate; /* an estimate of the non-garbage memory in use */ 255 lu_mem GCestimate; /* an estimate of the non-garbage memory in use */
255 lu_mem lastatomic; /* see function 'genstep' in file 'lgc.c' */ 256 lu_mem lastatomic; /* see function 'genstep' in file 'lgc.c' */