MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / checkSizes

Function checkSizes

lib/lua/src/lgc.c:871–879  ·  view source on GitHub ↗

** If possible, shrink string table. */

Source from the content-addressed store, hash-verified

869** If possible, shrink string table.
870*/
871static void checkSizes (lua_State *L, global_State *g) {
872 if (!g->gcemergency) {
873 if (g->strt.nuse < g->strt.size / 4) { /* string table too big? */
874 l_mem olddebt = g->GCdebt;
875 luaS_resize(L, g->strt.size / 2);
876 g->GCestimate += g->GCdebt - olddebt; /* correct estimate */
877 }
878 }
879}
880
881
882/*

Callers 2

finishgencycleFunction · 0.85
singlestepFunction · 0.85

Calls 1

luaS_resizeFunction · 0.85

Tested by

no test coverage detected