** If possible, shrink string table */
| 776 | ** If possible, shrink string table |
| 777 | */ |
| 778 | static void checkSizes (lua_State *L, global_State *g) { |
| 779 | if (g->gckind != KGC_EMERGENCY) { |
| 780 | l_mem olddebt = g->GCdebt; |
| 781 | if (g->strt.nuse < g->strt.size / 4) /* string table too big? */ |
| 782 | luaS_resize(L, g->strt.size / 2); /* shrink it a little */ |
| 783 | g->GCestimate += g->GCdebt - olddebt; /* update estimate */ |
| 784 | } |
| 785 | } |
| 786 | |
| 787 | |
| 788 | static GCObject *udata2finalize (global_State *g) { |
no test coverage detected