MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaE_setdebt

Function luaE_setdebt

src/Chain/libraries/glua/lstate.cpp:101–108  ·  view source on GitHub ↗

** set GCdebt to a new value keeping the value (totalbytes + GCdebt) ** invariant (and avoiding underflows in 'totalbytes') */

Source from the content-addressed store, hash-verified

99** invariant (and avoiding underflows in 'totalbytes')
100*/
101void luaE_setdebt(global_State *g, l_mem debt) {
102 l_mem tb = gettotalbytes(g);
103 lua_assert(tb > 0);
104 if (debt < tb - MAX_LMEM)
105 debt = tb - MAX_LMEM; /* will make 'totalbytes == MAX_LMEM' */
106 g->totalbytes = tb - debt;
107 g->GCdebt = debt;
108}
109
110
111CallInfo *luaE_extendCI(lua_State *L) {

Callers 3

setpauseFunction · 0.85
luaC_stepFunction · 0.85
lua_gcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected