MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaC_fullgc

Function luaC_fullgc

third-party/lua-5.5.0/src/lgc.c:1786–1800  ·  view source on GitHub ↗

** 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). */

Source from the content-addressed store, hash-verified

1784** unexpected ways (running finalizers and shrinking some structures).
1785*/
1786void luaC_fullgc (lua_State *L, int isemergency) {
1787 global_State *g = G(L);
1788 lua_assert(!g->gcemergency);
1789 g->gcemergency = cast_byte(isemergency); /* set flag */
1790 switch (g->gckind) {
1791 case KGC_GENMINOR: fullgen(L, g); break;
1792 case KGC_INC: fullinc(L, g); break;
1793 case KGC_GENMAJOR:
1794 g->gckind = KGC_INC;
1795 fullinc(L, g);
1796 g->gckind = KGC_GENMAJOR;
1797 break;
1798 }
1799 g->gcemergency = 0;
1800}
1801
1802/* }====================================================== */
1803

Callers 3

tryagainFunction · 0.70
lua_gcFunction · 0.70
growstrtabFunction · 0.70

Calls 2

fullgenFunction · 0.70
fullincFunction · 0.70

Tested by

no test coverage detected