** If possible, shrink string table. */
| 861 | ** If possible, shrink string table. |
| 862 | */ |
| 863 | static void checkSizes (lua_State *L, global_State *g) { |
| 864 | if (!g->gcemergency) { |
| 865 | if (g->strt.nuse < g->strt.size / 4) { /* string table too big? */ |
| 866 | l_mem olddebt = g->GCdebt; |
| 867 | luaS_resize(L, g->strt.size / 2); |
| 868 | g->GCestimate += g->GCdebt - olddebt; /* correct estimate */ |
| 869 | } |
| 870 | } |
| 871 | } |
| 872 | |
| 873 | |
| 874 | /* |
no test coverage detected