C API、lua_getgccount(), lua_getgcthreshold()
/* * $ gcc -Wall -W -I/usr/include/lua50 -o 2008102600 -llua50 2008102600.c */ #include <stdio.h> #include <lua.h> int main(void) { lua_State *L; int i; L = lua_open(); printf("%d %d\n", lua_getgccount(L), lua_getgcthreshold(L)); for (i = 0; i < 20; i++) { lua_newtable(L); lua_pushstring(L, "foo"); } printf("%d %d\n", lua_getgccount(L), lua_getgcthreshold(L)); lua_close(L); return 0; }
で、
3 12 3 12
?