MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / checkSizes

Function checkSizes

src/Chain/libraries/glua/lgc.cpp:780–787  ·  view source on GitHub ↗

** If possible, shrink string table */

Source from the content-addressed store, hash-verified

778** If possible, shrink string table
779*/
780static void checkSizes(lua_State *L, global_State *g) {
781 if (g->gckind != KGC_EMERGENCY) {
782 l_mem olddebt = g->GCdebt;
783 if (g->strt.nuse < g->strt.size / 4) /* string table too big? */
784 luaS_resize(L, g->strt.size / 2); /* shrink it a little */
785 g->GCestimate += g->GCdebt - olddebt; /* update estimate */
786 }
787}
788
789
790static GCObject *udata2finalize(global_State *g) {

Callers 1

singlestepFunction · 0.85

Calls 1

luaS_resizeFunction · 0.85

Tested by

no test coverage detected