MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaE_setdebt

Function luaE_setdebt

extlibs/lua/src/lstate.c:89–96  ·  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

87** invariant (and avoiding underflows in 'totalbytes')
88*/
89void luaE_setdebt (global_State *g, l_mem debt) {
90 l_mem tb = gettotalbytes(g);
91 lua_assert(tb > 0);
92 if (debt < tb - MAX_LMEM)
93 debt = tb - MAX_LMEM; /* will make 'totalbytes == MAX_LMEM' */
94 g->totalbytes = tb - debt;
95 g->GCdebt = debt;
96}
97
98
99LUA_API int lua_setcstacklimit (lua_State *L, unsigned int limit) {

Callers 4

lua_gcFunction · 0.85
setminordebtFunction · 0.85
setpauseFunction · 0.85
incstepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected