diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-02-23 18:07:34 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-02-23 18:07:34 -0300 |
| commit | f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9 (patch) | |
| tree | 84f67f71a728bc988661349c361f2a968b1d4910 /lbaselib.c | |
| parent | e6c1e6005a9346d378e004a6d6e7fd98c7ee191b (diff) | |
| download | lua-f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9.tar.gz lua-f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9.tar.bz2 lua-f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9.zip | |
generational collection: new attempt (still incomplete)
Diffstat (limited to 'lbaselib.c')
| -rw-r--r-- | lbaselib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.313 2016/04/11 19:18:40 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.314 2016/09/05 19:06:34 roberto Exp roberto $ |
| 3 | ** Basic library | 3 | ** Basic library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -173,10 +173,10 @@ static int luaB_rawset (lua_State *L) { | |||
| 173 | static int luaB_collectgarbage (lua_State *L) { | 173 | static int luaB_collectgarbage (lua_State *L) { |
| 174 | static const char *const opts[] = {"stop", "restart", "collect", | 174 | static const char *const opts[] = {"stop", "restart", "collect", |
| 175 | "count", "step", "setpause", "setstepmul", | 175 | "count", "step", "setpause", "setstepmul", |
| 176 | "isrunning", NULL}; | 176 | "isrunning", "generational", "incremental", NULL}; |
| 177 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, | 177 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, |
| 178 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, | 178 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, |
| 179 | LUA_GCISRUNNING}; | 179 | LUA_GCISRUNNING, LUA_GCGEN, LUA_GCINC}; |
| 180 | int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; | 180 | int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; |
| 181 | int ex = (int)luaL_optinteger(L, 2, 0); | 181 | int ex = (int)luaL_optinteger(L, 2, 0); |
| 182 | int res = lua_gc(L, o, ex); | 182 | int res = lua_gc(L, o, ex); |
