MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / entergen

Function entergen

lib/lua/src/lgc.c:1329–1337  ·  view source on GitHub ↗

** Enter generational mode. Must go until the end of an atomic cycle ** to ensure that all objects are correctly marked and weak tables ** are cleared. Then, turn all objects into old and finishes the ** collection. */

Source from the content-addressed store, hash-verified

1327** collection.
1328*/
1329static lu_mem entergen (lua_State *L, global_State *g) {
1330 lu_mem numobjs;
1331 luaC_runtilstate(L, bitmask(GCSpause)); /* prepare to start a new cycle */
1332 luaC_runtilstate(L, bitmask(GCSpropagate)); /* start new cycle */
1333 numobjs = atomic(L); /* propagates all and then do the atomic stuff */
1334 atomic2gen(L, g);
1335 setminordebt(g); /* set debt assuming next cycle will be minor */
1336 return numobjs;
1337}
1338
1339
1340/*

Callers 2

luaC_changemodeFunction · 0.85
fullgenFunction · 0.85

Calls 4

luaC_runtilstateFunction · 0.85
atomicFunction · 0.85
atomic2genFunction · 0.85
setminordebtFunction · 0.85

Tested by

no test coverage detected