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

Function setpause

third-party/lua-5.2.4/src/lgc.c:913–921  ·  view source on GitHub ↗

** set a reasonable "time" to wait before starting a new GC cycle; ** cycle will start when memory use hits threshold */

Source from the content-addressed store, hash-verified

911** cycle will start when memory use hits threshold
912*/
913static void setpause (global_State *g, l_mem estimate) {
914 l_mem debt, threshold;
915 estimate = estimate / PAUSEADJ; /* adjust 'estimate' */
916 threshold = (g->gcpause < MAX_LMEM / estimate) /* overflow? */
917 ? estimate * g->gcpause /* no overflow */
918 : MAX_LMEM; /* overflow; truncate to maximum */
919 debt = -cast(l_mem, threshold - gettotalbytes(g));
920 luaE_setdebt(g, debt);
921}
922
923
924#define sweepphases \

Callers 3

generationalcollectionFunction · 0.70
incstepFunction · 0.70
luaC_fullgcFunction · 0.70

Calls 1

luaE_setdebtFunction · 0.70

Tested by

no test coverage detected