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

Function fullinc

extlibs/lua/src/lgc.c:1585–1595  ·  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

1583** changed, nothing will be collected).
1584*/
1585static void fullinc (lua_State *L, global_State *g) {
1586 if (keepinvariant(g)) /* black objects? */
1587 entersweep(L); /* sweep everything to turn them back to white */
1588 /* finish any pending sweep phase to start a new cycle */
1589 luaC_runtilstate(L, bitmask(GCSpause));
1590 luaC_runtilstate(L, bitmask(GCScallfin)); /* run up to finalizers */
1591 /* estimate must be correct after a full GC cycle */
1592 lua_assert(g->GCestimate == gettotalbytes(g));
1593 luaC_runtilstate(L, bitmask(GCSpause)); /* finish collection */
1594 setpause(g);
1595}
1596
1597
1598/*

Callers 1

luaC_fullgcFunction · 0.85

Calls 3

entersweepFunction · 0.85
luaC_runtilstateFunction · 0.85
setpauseFunction · 0.85

Tested by

no test coverage detected