diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-10 13:39:35 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-10 13:39:35 -0200 |
| commit | d915cf4f9dbe525f8faeb4cb04df13d5f08692da (patch) | |
| tree | b166ca7e66e02999fee1500363c4d301b7e53951 /lstate.c | |
| parent | 53fb65d39451f9245d8ed555f941829520ee6f24 (diff) | |
| download | lua-github-d915cf4f9dbe525f8faeb4cb04df13d5f08692da.tar.gz | |
ways to measure number of `blocks' for GC + details
Diffstat (limited to 'lstate.c')
| -rw-r--r-- | lstate.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.14 1999/10/04 17:51:04 roberto Exp $ +** $Id: lstate.c,v 1.15 1999/10/14 17:53:35 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -10,6 +10,7 @@ #include "lgc.h" #include "llex.h" #include "lmem.h" +#include "lref.h" #include "lstate.h" #include "lstring.h" #include "ltm.h" @@ -41,13 +42,15 @@ void lua_open (void) { L->IMtable = NULL; L->refArray = NULL; L->refSize = 0; - L->GCthreshold = GARBAGE_BLOCK; + L->refFree = NONEXT; L->nblocks = 0; + L->GCthreshold = MAX_INT; /* to avoid GC during pre-definitions */ luaD_init(); luaS_init(); luaX_init(); luaT_init(); luaB_predefine(); + L->GCthreshold = L->nblocks*4; } @@ -70,4 +73,3 @@ void lua_close (void) { L = NULL; } - |
