diff options
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 2.205 2015/03/25 13:42:19 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.206 2015/07/13 13:30:03 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -769,12 +769,11 @@ static GCObject **sweeptolive (lua_State *L, GCObject **p, int *n) { | |||
769 | */ | 769 | */ |
770 | 770 | ||
771 | /* | 771 | /* |
772 | ** If possible, free concatenation buffer and shrink string table | 772 | ** If possible, shrink string table |
773 | */ | 773 | */ |
774 | static void checkSizes (lua_State *L, global_State *g) { | 774 | static void checkSizes (lua_State *L, global_State *g) { |
775 | if (g->gckind != KGC_EMERGENCY) { | 775 | if (g->gckind != KGC_EMERGENCY) { |
776 | l_mem olddebt = g->GCdebt; | 776 | l_mem olddebt = g->GCdebt; |
777 | luaZ_freebuffer(L, &g->buff); /* free concatenation buffer */ | ||
778 | if (g->strt.nuse < g->strt.size / 4) /* string table too big? */ | 777 | if (g->strt.nuse < g->strt.size / 4) /* string table too big? */ |
779 | luaS_resize(L, g->strt.size / 2); /* shrink it a little */ | 778 | luaS_resize(L, g->strt.size / 2); /* shrink it a little */ |
780 | g->GCestimate += g->GCdebt - olddebt; /* update estimate */ | 779 | g->GCestimate += g->GCdebt - olddebt; /* update estimate */ |