summaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-09-03 11:14:01 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-09-03 11:14:01 -0300
commit6828f6d42786de735d6696da8cccbb47c8bad347 (patch)
tree4645194f43ebcfbd7a00af35278b1e688148760c /lstate.c
parentdaa5fe3e31d8ca28a8770df135cbad7fa6fdfa4b (diff)
downloadlua-github-6828f6d42786de735d6696da8cccbb47c8bad347.tar.gz
new parameter 'majorinc' to control frequency of major collections
in generational mode
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lstate.c b/lstate.c
index e48e9999..ef4f89cd 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
/*
-** $Id: lstate.c,v 2.84 2010/04/30 14:22:23 roberto Exp roberto $
+** $Id: lstate.c,v 2.85 2010/04/30 18:36:22 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -29,6 +29,10 @@
#define LUAI_GCPAUSE 200 /* 200% */
#endif
+#if !defined(LUAI_GCMAJOR)
+#define LUAI_GCMAJOR 200 /* 200% */
+#endif
+
#if !defined(LUAI_GCMUL)
#define LUAI_GCMUL 200 /* GC runs 'twice the speed' of memory allocation */
#endif
@@ -254,6 +258,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
g->weak = g->ephemeron = g->allweak = NULL;
g->totalbytes = sizeof(LG);
g->gcpause = LUAI_GCPAUSE;
+ g->gcmajorinc = LUAI_GCMAJOR;
g->gcstepmul = LUAI_GCMUL;
for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL;
if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) {