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

Function luaC_changemode

third-party/lua-5.5.0/src/lgc.c:1440–1452  ·  view source on GitHub ↗

** Change collector mode to 'newmode'. */

Source from the content-addressed store, hash-verified

1438** Change collector mode to 'newmode'.
1439*/
1440void luaC_changemode (lua_State *L, int newmode) {
1441 global_State *g = G(L);
1442 if (g->gckind == KGC_GENMAJOR) /* doing major collections? */
1443 g->gckind = KGC_INC; /* already incremental but in name */
1444 if (newmode != g->gckind) { /* does it need to change? */
1445 if (newmode == KGC_INC) /* entering incremental mode? */
1446 minor2inc(L, g, KGC_INC); /* entering incremental mode */
1447 else {
1448 lua_assert(newmode == KGC_GENMINOR);
1449 entergen(L, g);
1450 }
1451 }
1452}
1453
1454
1455/*

Callers 2

lua_gcFunction · 0.70
luaC_freeallobjectsFunction · 0.70

Calls 2

minor2incFunction · 0.85
entergenFunction · 0.70

Tested by

no test coverage detected