** performs a basic GC step */
| 1161 | ** performs a basic GC step |
| 1162 | */ |
| 1163 | void luaC_forcestep (lua_State *L) { |
| 1164 | global_State *g = G(L); |
| 1165 | int i; |
| 1166 | if (isgenerational(g)) generationalcollection(L); |
| 1167 | else incstep(L); |
| 1168 | /* run a few finalizers (or all of them at the end of a collect cycle) */ |
| 1169 | for (i = 0; g->tobefnz && (i < GCFINALIZENUM || g->gcstate == GCSpause); i++) |
| 1170 | GCTM(L, 1); /* call one finalizer */ |
| 1171 | } |
| 1172 | |
| 1173 | |
| 1174 | /* |
no test coverage detected