MCPcopy Create free account
hub / github.com/F-Stack/f-stack / setpause

Function setpause

freebsd/contrib/openzfs/module/lua/lgc.c:912–920  ·  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

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

Callers 3

generationalcollectionFunction · 0.85
incstepFunction · 0.85
luaC_fullgcFunction · 0.85

Calls 1

luaE_setdebtFunction · 0.85

Tested by

no test coverage detected