** If possible, shrink string table. */
| 869 | ** If possible, shrink string table. |
| 870 | */ |
| 871 | static void checkSizes (lua_State *L, global_State *g) { |
| 872 | if (!g->gcemergency) { |
| 873 | if (g->strt.nuse < g->strt.size / 4) { /* string table too big? */ |
| 874 | l_mem olddebt = g->GCdebt; |
| 875 | luaS_resize(L, g->strt.size / 2); |
| 876 | g->GCestimate += g->GCdebt - olddebt; /* correct estimate */ |
| 877 | } |
| 878 | } |
| 879 | } |
| 880 | |
| 881 | |
| 882 | /* |
no test coverage detected