MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / checkSizes

Function checkSizes

Source/Misc/lua/src/lua.c:6433–6444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6431
6432
6433static void checkSizes (lua_State *L) {
6434global_State *g = G(L);
6435/* check size of string hash */
6436if (g->strt.nuse < cast(lu_int32, g->strt.size/4) &&
6437g->strt.size > MINSTRTABSIZE*2)
6438luaS_resize(L, g->strt.size/2); /* table is too big */
6439/* check size of buffer */
6440if (luaZ_sizebuffer(&g->buff) > LUA_MINBUFFER*2) { /* buffer too big? */
6441size_t newsize = luaZ_sizebuffer(&g->buff) / 2;
6442luaZ_resizebuffer(L, &g->buff, newsize);
6443}
6444}
6445
6446
6447static void GCTM (lua_State *L) {

Callers 1

singlestepFunction · 0.85

Calls 1

luaS_resizeFunction · 0.85

Tested by

no test coverage detected