MCPcopy Create free account
hub / github.com/F-Stack/f-stack / entersweep

Function entersweep

freebsd/contrib/openzfs/module/lua/lgc.c:935–945  ·  view source on GitHub ↗

** enter first sweep phase (strings) and prepare pointers for other ** sweep phases. The calls to 'sweeptolive' make pointers point to an ** object inside the list (instead of to the header), so that the real ** sweep do not need to skip objects created between "now" and the start ** of the real sweep. ** Returns how many objects it swept. */

Source from the content-addressed store, hash-verified

933** Returns how many objects it swept.
934*/
935static int entersweep (lua_State *L) {
936 global_State *g = G(L);
937 int n = 0;
938 g->gcstate = GCSsweepstring;
939 lua_assert(g->sweepgc == NULL && g->sweepfin == NULL);
940 /* prepare to sweep strings, finalizable objects, and regular objects */
941 g->sweepstrgc = 0;
942 g->sweepfin = sweeptolive(L, &g->finobj, &n);
943 g->sweepgc = sweeptolive(L, &g->allgc, &n);
944 return n;
945}
946
947
948/*

Callers 3

luaC_changemodeFunction · 0.85
singlestepFunction · 0.85
luaC_fullgcFunction · 0.85

Calls 1

sweeptoliveFunction · 0.85

Tested by

no test coverage detected