MCPcopy Create free account
hub / github.com/defold/defold / luaC_fullgc

Function luaC_fullgc

engine/lua/src/lua/lgc.c:636–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634
635
636void luaC_fullgc (lua_State *L) {
637 global_State *g = G(L);
638 if (g->gcstate <= GCSpropagate) {
639 /* reset sweep marks to sweep all elements (returning them to white) */
640 g->sweepstrgc = 0;
641 g->sweepgc = &g->rootgc;
642 /* reset other collector lists */
643 g->gray = NULL;
644 g->grayagain = NULL;
645 g->weak = NULL;
646 g->gcstate = GCSsweepstring;
647 }
648 lua_assert(g->gcstate != GCSpause && g->gcstate != GCSpropagate);
649 /* finish any pending sweep phase */
650 while (g->gcstate != GCSfinalize) {
651 lua_assert(g->gcstate == GCSsweepstring || g->gcstate == GCSsweep);
652 singlestep(L);
653 }
654 markroot(L);
655 while (g->gcstate != GCSpause) {
656 singlestep(L);
657 }
658 setthreshold(g);
659}
660
661
662void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v) {

Callers 1

lua_gcFunction · 0.85

Calls 3

singlestepFunction · 0.85
markrootFunction · 0.85
GFunction · 0.50

Tested by

no test coverage detected