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

Function atomic2gen

third-party/lua-5.5.0/src/lgc.c:1389–1408  ·  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

1387** else is turned black (not in any gray list).
1388*/
1389static void atomic2gen (lua_State *L, global_State *g) {
1390 cleargraylists(g);
1391 /* sweep all elements making them old */
1392 g->gcstate = GCSswpallgc;
1393 sweep2old(L, &g->allgc);
1394 /* everything alive now is old */
1395 g->reallyold = g->old1 = g->survival = g->allgc;
1396 g->firstold1 = NULL; /* there are no OLD1 objects anywhere */
1397
1398 /* repeat for 'finobj' lists */
1399 sweep2old(L, &g->finobj);
1400 g->finobjrold = g->finobjold1 = g->finobjsur = g->finobj;
1401
1402 sweep2old(L, &g->tobefnz);
1403
1404 g->gckind = KGC_GENMINOR;
1405 g->GCmajorminor = g->GCmarked; /* "base" for number of bytes */
1406 g->GCmarked = 0; /* to count the number of added old1 bytes */
1407 finishgencycle(L, g);
1408}
1409
1410
1411/*

Callers 2

entergenFunction · 0.70
checkmajorminorFunction · 0.70

Calls 3

cleargraylistsFunction · 0.70
sweep2oldFunction · 0.70
finishgencycleFunction · 0.70

Tested by

no test coverage detected