MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / checkSizes

Function checkSizes

extlibs/lua/src/lgc.c:802–810  ·  view source on GitHub ↗

** If possible, shrink string table. */

Source from the content-addressed store, hash-verified

800** If possible, shrink string table.
801*/
802static void checkSizes (lua_State *L, global_State *g) {
803 if (!g->gcemergency) {
804 if (g->strt.nuse < g->strt.size / 4) { /* string table too big? */
805 l_mem olddebt = g->GCdebt;
806 luaS_resize(L, g->strt.size / 2);
807 g->GCestimate += g->GCdebt - olddebt; /* correct estimate */
808 }
809 }
810}
811
812
813/*

Callers 2

finishgencycleFunction · 0.85
singlestepFunction · 0.85

Calls 1

luaS_resizeFunction · 0.85

Tested by

no test coverage detected