** Performs a full GC cycle; if 'isemergency', set a flag to avoid ** some operations which could change the interpreter state in some ** unexpected ways (running finalizers and shrinking some structures). */
| 1728 | ** unexpected ways (running finalizers and shrinking some structures). |
| 1729 | */ |
| 1730 | void luaC_fullgc (lua_State *L, int isemergency) { |
| 1731 | global_State *g = G(L); |
| 1732 | lua_assert(!g->gcemergency); |
| 1733 | g->gcemergency = isemergency; /* set flag */ |
| 1734 | if (g->gckind == KGC_INC) |
| 1735 | fullinc(L, g); |
| 1736 | else |
| 1737 | fullgen(L, g); |
| 1738 | g->gcemergency = 0; |
| 1739 | } |
| 1740 | |
| 1741 | /* }====================================================== */ |
| 1742 |