MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaC_fullgc

Function luaC_fullgc

Source/Misc/lua/src/lua.c:6638–6661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6636
6637
6638void luaC_fullgc (lua_State *L) {
6639global_State *g = G(L);
6640if (g->gcstate <= GCSpropagate) {
6641/* reset sweep marks to sweep all elements (returning them to white) */
6642g->sweepstrgc = 0;
6643g->sweepgc = &g->rootgc;
6644/* reset other collector lists */
6645g->gray = NULL;
6646g->grayagain = NULL;
6647g->weak = NULL;
6648g->gcstate = GCSsweepstring;
6649}
6650lua_assert(g->gcstate != GCSpause && g->gcstate != GCSpropagate);
6651/* finish any pending sweep phase */
6652while (g->gcstate != GCSfinalize) {
6653lua_assert(g->gcstate == GCSsweepstring || g->gcstate == GCSsweep);
6654singlestep(L);
6655}
6656markroot(L);
6657while (g->gcstate != GCSpause) {
6658singlestep(L);
6659}
6660setthreshold(g);
6661}
6662
6663
6664void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v) {

Callers 1

lua_gcFunction · 0.85

Calls 2

singlestepFunction · 0.85
markrootFunction · 0.85

Tested by

no test coverage detected