generational collection: new attempt (still incomplete)

This commit is contained in:
Roberto Ierusalimschy
2017-02-23 18:07:34 -03:00
parent e6c1e6005a
commit f5f3df3bd1
8 changed files with 195 additions and 40 deletions

10
lapi.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lapi.c,v 2.258 2016/01/05 16:07:21 roberto Exp roberto $
** $Id: lapi.c,v 2.259 2016/02/29 14:27:14 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -1097,6 +1097,14 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
res = g->gcrunning;
break;
}
case LUA_GCGEN: {
luaC_changemode(L, KGC_GEN);
break;
}
case LUA_GCINC: {
luaC_changemode(L, KGC_NORMAL);
break;
}
default: res = -1; /* invalid option */
}
lua_unlock(L);