C API、lua_setgcthreshold()
/* * $ gcc -Wall -W -I/usr/include/lua50 -o 2008102700 -llua50 2008102700.c */ #include <stdio.h> #include <lua.h> int main(void) { lua_State *L; L = lua_open(); printf("%d %d\n", lua_getgccount(L), lua_getgcthreshold(L)); lua_setgcthreshold(L, 1); printf("%d %d\n", lua_getgccount(L), lua_getgcthreshold(L)); lua_close(L); return 0; }
で、
3 12 3 6