** Perform a full collection in incremental mode. ** Before running the collection, check 'keepinvariant'; if it is true, ** there may be some objects marked as black, so the collector has ** to sweep all objects to turn them back to white (as white has not ** changed, nothing will be collected). */
| 1768 | ** changed, nothing will be collected). |
| 1769 | */ |
| 1770 | static void fullinc (lua_State *L, global_State *g) { |
| 1771 | if (keepinvariant(g)) /* black objects? */ |
| 1772 | entersweep(L); /* sweep everything to turn them back to white */ |
| 1773 | /* finish any pending sweep phase to start a new cycle */ |
| 1774 | luaC_runtilstate(L, GCSpause, 1); |
| 1775 | luaC_runtilstate(L, GCScallfin, 1); /* run up to finalizers */ |
| 1776 | luaC_runtilstate(L, GCSpause, 1); /* finish collection */ |
| 1777 | setpause(g); |
| 1778 | } |
| 1779 | |
| 1780 | |
| 1781 | /* |
no test coverage detected