MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaE_setdebt

Function luaE_setdebt

third-party/lua-5.5.0/src/lstate.c:61–68  ·  view source on GitHub ↗

** set GCdebt to a new value keeping the real number of allocated ** objects (GCtotalobjs - GCdebt) invariant and avoiding overflows in ** 'GCtotalobjs'. */

Source from the content-addressed store, hash-verified

59** 'GCtotalobjs'.
60*/
61void luaE_setdebt (global_State *g, l_mem debt) {
62 l_mem tb = gettotalbytes(g);
63 lua_assert(tb > 0);
64 if (debt > MAX_LMEM - tb)
65 debt = MAX_LMEM - tb; /* will make GCtotalbytes == MAX_LMEM */
66 g->GCtotalbytes = tb + debt;
67 g->GCdebt = debt;
68}
69
70
71CallInfo *luaE_extendCI (lua_State *L) {

Callers 6

lua_gcFunction · 0.70
setpauseFunction · 0.70
minor2incFunction · 0.70
setminordebtFunction · 0.70
incstepFunction · 0.70
luaC_stepFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected