mirror of
https://github.com/lua/lua
synced 2024-11-22 12:51:30 +03:00
trocar a funcao para garbage colector adaptativo.
This commit is contained in:
parent
97053335fb
commit
6e0e9935ec
4
table.c
4
table.c
@ -3,7 +3,7 @@
|
||||
** Module to control static tables
|
||||
*/
|
||||
|
||||
char *rcs_table="$Id: table.c,v 2.26 1995/01/12 14:19:04 roberto Exp roberto $";
|
||||
char *rcs_table="$Id: table.c,v 2.27 1995/01/13 22:11:12 roberto Exp celes $";
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@ -183,7 +183,7 @@ void lua_pack (void)
|
||||
recovered += lua_strcollector();
|
||||
recovered += lua_hashcollector();
|
||||
nentity = 0; /* reset counter */
|
||||
block=2*block-3*recovered/2; /* adapt block size */
|
||||
block=(16*block-7*recovered)/12; /* adapt block size */
|
||||
if (block < MIN_GARBAGE_BLOCK) block = MIN_GARBAGE_BLOCK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user