MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / checkSizes

Function checkSizes

3rd/lua-5.4.3/src/lgc.c:863–871  ·  view source on GitHub ↗

** If possible, shrink string table. */

Source from the content-addressed store, hash-verified

861** If possible, shrink string table.
862*/
863static void checkSizes (lua_State *L, global_State *g) {
864 if (!g->gcemergency) {
865 if (g->strt.nuse < g->strt.size / 4) { /* string table too big? */
866 l_mem olddebt = g->GCdebt;
867 luaS_resize(L, g->strt.size / 2);
868 g->GCestimate += g->GCdebt - olddebt; /* correct estimate */
869 }
870 }
871}
872
873
874/*

Callers 2

finishgencycleFunction · 0.85
singlestepFunction · 0.85

Calls 1

luaS_resizeFunction · 0.85

Tested by

no test coverage detected