MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / atomic2gen

Function atomic2gen

third-party/lua-5.4.6/src/lgc.c:1292–1311  ·  view source on GitHub ↗

** Clears all gray lists, sweeps objects, and prepare sublists to enter ** generational mode. The sweeps remove dead objects and turn all ** surviving objects to old. Threads go back to 'grayagain'; everything ** else is turned black (not in any gray list). */

Source from the content-addressed store, hash-verified

1290** else is turned black (not in any gray list).
1291*/
1292static void atomic2gen (lua_State *L, global_State *g) {
1293 cleargraylists(g);
1294 /* sweep all elements making them old */
1295 g->gcstate = GCSswpallgc;
1296 sweep2old(L, &g->allgc);
1297 /* everything alive now is old */
1298 g->reallyold = g->old1 = g->survival = g->allgc;
1299 g->firstold1 = NULL; /* there are no OLD1 objects anywhere */
1300
1301 /* repeat for 'finobj' lists */
1302 sweep2old(L, &g->finobj);
1303 g->finobjrold = g->finobjold1 = g->finobjsur = g->finobj;
1304
1305 sweep2old(L, &g->tobefnz);
1306
1307 g->gckind = KGC_GEN;
1308 g->lastatomic = 0;
1309 g->GCestimate = gettotalbytes(g); /* base for memory control */
1310 finishgencycle(L, g);
1311}
1312
1313
1314/*

Callers 2

entergenFunction · 0.70
stepgenfullFunction · 0.70

Calls 3

cleargraylistsFunction · 0.70
sweep2oldFunction · 0.70
finishgencycleFunction · 0.70

Tested by

no test coverage detected