MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / luaC_fullgc

Function luaC_fullgc

other_src/lua/src/lgc.cpp:637–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

lua_gcFunction · 0.70

Calls 2

singlestepFunction · 0.70
markrootFunction · 0.70

Tested by

no test coverage detected