MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / entergen

Function entergen

extlibs/lua/src/lgc.c:1193–1200  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1191** Then, turn all objects into old and finishes the collection.
1192*/
1193static lu_mem entergen (lua_State *L, global_State *g) {
1194 lu_mem numobjs;
1195 luaC_runtilstate(L, bitmask(GCSpause)); /* prepare to start a new cycle */
1196 luaC_runtilstate(L, bitmask(GCSpropagate)); /* start new cycle */
1197 numobjs = atomic(L); /* propagates all and then do the atomic stuff */
1198 atomic2gen(L, g);
1199 return numobjs;
1200}
1201
1202
1203/*

Callers 2

luaC_changemodeFunction · 0.85
fullgenFunction · 0.85

Calls 3

luaC_runtilstateFunction · 0.85
atomicFunction · 0.85
atomic2genFunction · 0.85

Tested by

no test coverage detected