From 74123e96869bdb55d3967036e2bc0c6f9e0550d6 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 22 Mar 2010 15:28:03 -0300 Subject: draft version of a generational mode for garbage collection. (Not well tested; no major collections; ...) --- lbaselib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lbaselib.c') diff --git a/lbaselib.c b/lbaselib.c index 3af55a79..bba92816 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.237 2010/03/13 03:57:46 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.238 2010/03/19 15:52:48 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -186,10 +186,10 @@ static int luaB_gcinfo (lua_State *L) { static int luaB_collectgarbage (lua_State *L) { static const char *const opts[] = {"stop", "restart", "collect", - "count", "step", "setpause", "setstepmul", "isrunning", NULL}; + "count", "step", "setpause", "setstepmul", "isrunning", "gen", NULL}; static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, - LUA_GCISRUNNING}; + LUA_GCISRUNNING, LUA_GCGEN}; int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; int ex = luaL_optint(L, 2, 0); int res = lua_gc(L, o, ex); -- cgit v1.2.3-55-g6feb