aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Celes <celes@tecgraf.puc-rio.br>1995-01-18 18:15:54 -0200
committerWaldemar Celes <celes@tecgraf.puc-rio.br>1995-01-18 18:15:54 -0200
commit6e0e9935ec6ca877d17aa0fbc125a0c4a4e4b01b (patch)
treebbbf330084e6dcef79bcc68da2d8c15cd6dca44b
parent97053335fb14b1340e078fb0f87564429667ac84 (diff)
downloadlua-6e0e9935ec6ca877d17aa0fbc125a0c4a4e4b01b.tar.gz
lua-6e0e9935ec6ca877d17aa0fbc125a0c4a4e4b01b.tar.bz2
lua-6e0e9935ec6ca877d17aa0fbc125a0c4a4e4b01b.zip
trocar a funcao para garbage colector adaptativo.
-rw-r--r--table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/table.c b/table.c
index 1eec2913..ac471124 100644
--- a/table.c
+++ b/table.c
@@ -3,7 +3,7 @@
3** Module to control static tables 3** Module to control static tables
4*/ 4*/
5 5
6char *rcs_table="$Id: table.c,v 2.26 1995/01/12 14:19:04 roberto Exp roberto $"; 6char *rcs_table="$Id: table.c,v 2.27 1995/01/13 22:11:12 roberto Exp celes $";
7 7
8#include <string.h> 8#include <string.h>
9 9
@@ -183,7 +183,7 @@ void lua_pack (void)
183 recovered += lua_strcollector(); 183 recovered += lua_strcollector();
184 recovered += lua_hashcollector(); 184 recovered += lua_hashcollector();
185 nentity = 0; /* reset counter */ 185 nentity = 0; /* reset counter */
186 block=2*block-3*recovered/2; /* adapt block size */ 186 block=(16*block-7*recovered)/12; /* adapt block size */
187 if (block < MIN_GARBAGE_BLOCK) block = MIN_GARBAGE_BLOCK; 187 if (block < MIN_GARBAGE_BLOCK) block = MIN_GARBAGE_BLOCK;
188} 188}
189 189