MCPcopy Create free account
hub / github.com/F-Stack/f-stack / checkSizes

Function checkSizes

freebsd/contrib/openzfs/module/lua/lgc.c:777–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

singlestepFunction · 0.70

Calls 1

luaS_resizeFunction · 0.70

Tested by

no test coverage detected