MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / fullinc

Function fullinc

3rd/lua-5.4.3/src/lgc.c:1697–1707  ·  view source on GitHub ↗

** Perform a full collection in incremental mode. ** Before running the collection, check 'keepinvariant'; if it is true, ** there may be some objects marked as black, so the collector has ** to sweep all objects to turn them back to white (as white has not ** changed, nothing will be collected). */

Source from the content-addressed store, hash-verified

1695** changed, nothing will be collected).
1696*/
1697static void fullinc (lua_State *L, global_State *g) {
1698 if (keepinvariant(g)) /* black objects? */
1699 entersweep(L); /* sweep everything to turn them back to white */
1700 /* finish any pending sweep phase to start a new cycle */
1701 luaC_runtilstate(L, bitmask(GCSpause));
1702 luaC_runtilstate(L, bitmask(GCScallfin)); /* run up to finalizers */
1703 /* estimate must be correct after a full GC cycle */
1704 lua_assert(g->GCestimate == gettotalbytes(g));
1705 luaC_runtilstate(L, bitmask(GCSpause)); /* finish collection */
1706 setpause(g);
1707}
1708
1709
1710/*

Callers 1

luaC_fullgcFunction · 0.85

Calls 3

entersweepFunction · 0.85
luaC_runtilstateFunction · 0.85
setpauseFunction · 0.85

Tested by

no test coverage detected