mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
control of garbage collection is done with Longs, as there can be
more than WORD objects to collect.
This commit is contained in:
parent
53c0a0f43c
commit
8faf4d1de2
5 changed files with 16 additions and 14 deletions
8
table.c
8
table.c
|
|
@ -3,7 +3,7 @@
|
|||
** Module to control static tables
|
||||
*/
|
||||
|
||||
char *rcs_table="$Id: table.c,v 2.24 1994/12/16 15:55:04 roberto Exp roberto $";
|
||||
char *rcs_table="$Id: table.c,v 2.25 1994/12/20 21:20:36 roberto Exp roberto $";
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
@ -173,9 +173,9 @@ void lua_markobject (Object *o)
|
|||
*/
|
||||
void lua_pack (void)
|
||||
{
|
||||
static Word block = GARBAGE_BLOCK; /* when garbage collector will be called */
|
||||
static Word nentity = 0; /* counter of new entities (strings and arrays) */
|
||||
Word recovered = 0;
|
||||
static Long block = GARBAGE_BLOCK; /* when garbage collector will be called */
|
||||
static Long nentity = 0; /* counter of new entities (strings and arrays) */
|
||||
Long recovered = 0;
|
||||
if (nentity++ < block) return;
|
||||
lua_travstack(lua_markobject); /* mark stack objects */
|
||||
lua_travsymbol(lua_markobject); /* mark symbol table objects */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue