Lines Matching +full:free +full:- +full:running
1 // SPDX-License-Identifier: MIT
20 ** Some notes about garbage-collected objects: All objects in Lua must
23 ** Lua keeps most objects linked in list g->allgc. The link uses field
26 ** Strings are kept in several lists headed by the array g->strt.hash.
30 ** double-linked list with all open upvalues (g->uvhead) so that it can
36 ** Objects with finalizers are kept in the list g->finobj.
38 ** The list g->tobefnz links all objects being finalized.
96 #define CIST_LUA (1<<0) /* call is running a Lua function */
97 #define CIST_HOOKED (1<<1) /* call is running a debug hook */
98 #define CIST_REENTRY (1<<2) /* call is running on same invocation of
107 #define isLua(ci) ((ci)->callstatus & CIST_LUA)
116 lu_mem totalbytes; /* number of bytes currently allocated - GCdebt */
119 lu_mem GCestimate; /* an estimate of the non-garbage memory in use */
125 lu_byte gckind; /* kind of GC running */
126 lu_byte gcrunning; /* true if GC is running */
136 GCObject *allweak; /* list of all-weak tables */
138 UpVal uvhead; /* head of double-linked list of all open upvalues */
146 TString *memerrmsg; /* memory-error message */
147 TString *tmname[TM_N]; /* array with tag-method names */
158 StkId top; /* first free slot in the stack */
162 StkId stack_last; /* last free slot in the stack */
165 unsigned short nny; /* number of non-yieldable calls in stack */
181 #define G(L) (L->l_G)
199 #define gch(o) (&(o)->gch)
203 check_exp(novariant((o)->gch.tt) == LUA_TSTRING, &((o)->ts))
204 #define gco2ts(o) (&rawgco2ts(o)->tsv)
205 #define rawgco2u(o) check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u))
206 #define gco2u(o) (&rawgco2u(o)->uv)
207 #define gco2lcl(o) check_exp((o)->gch.tt == LUA_TLCL, &((o)->cl.l))
208 #define gco2ccl(o) check_exp((o)->gch.tt == LUA_TCCL, &((o)->cl.c))
210 check_exp(novariant((o)->gch.tt) == LUA_TFUNCTION, &((o)->cl))
211 #define gco2t(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h))
212 #define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p))
213 #define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))
214 #define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th))
221 #define gettotalbytes(g) ((g)->totalbytes + (g)->GCdebt)