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

Function checkSizes

third-party/lua-5.2.4/src/lgc.c:778–786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776*/
777
778static void checkSizes (lua_State *L) {
779 global_State *g = G(L);
780 if (g->gckind != KGC_EMERGENCY) { /* do not change sizes in emergency */
781 int hs = g->strt.size / 2; /* half the size of the string table */
782 if (g->strt.nuse < cast(lu_int32, hs)) /* using less than that half? */
783 luaS_resize(L, hs); /* halve its size */
784 luaZ_freebuffer(L, &g->buff); /* free concatenation buffer */
785 }
786}
787
788
789static GCObject *udata2finalize (global_State *g) {

Callers 1

singlestepFunction · 0.70

Calls 1

luaS_resizeFunction · 0.70

Tested by

no test coverage detected