** 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. */
| 1327 | ** collection. |
| 1328 | */ |
| 1329 | static 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 | /* |
no test coverage detected