Browse Source

when "block" is computed, "nentity" == "block". So the change is only

a simpler way to write the same expression.
v5-2
Roberto Ierusalimschy 29 years ago
parent
commit
ec6677e551
  1. 4
      table.c

4
table.c

@ -3,7 +3,7 @@
** Module to control static tables ** Module to control static tables
*/ */
char *rcs_table="$Id: table.c,v 2.54 1996/05/06 14:29:35 roberto Exp roberto $"; char *rcs_table="$Id: table.c,v 2.55 1996/05/28 21:07:32 roberto Exp roberto $";
#include "mem.h" #include "mem.h"
#include "opcode.h" #include "opcode.h"
@ -214,7 +214,7 @@ void lua_pack (void)
unsigned long recovered = 0; unsigned long recovered = 0;
if (nentity++ < block) return; if (nentity++ < block) return;
recovered = luaI_collectgarbage(); recovered = luaI_collectgarbage();
block = block*2*(1.0 - (float)recovered/nentity); block = 2*(block-recovered);
nentity -= recovered; nentity -= recovered;
} }

Loading…
Cancel
Save