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

Function checkSizes

app/redis-6.2.6/deps/lua/src/lgc.c:431–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429
430
431static void checkSizes (lua_State *L) {
432 global_State *g = G(L);
433 /* check size of string hash */
434 if (g->strt.nuse < cast(lu_int32, g->strt.size/4) &&
435 g->strt.size > MINSTRTABSIZE*2)
436 luaS_resize(L, g->strt.size/2); /* table is too big */
437 /* check size of buffer */
438 if (luaZ_sizebuffer(&g->buff) > LUA_MINBUFFER*2) { /* buffer too big? */
439 size_t newsize = luaZ_sizebuffer(&g->buff) / 2;
440 luaZ_resizebuffer(L, &g->buff, newsize);
441 }
442}
443
444
445static void GCTM (lua_State *L) {

Callers 1

singlestepFunction · 0.70

Calls 1

luaS_resizeFunction · 0.70

Tested by

no test coverage detected