aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_api.c2
-rw-r--r--src/luajit.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_api.c b/src/lj_api.c
index ed4238a9..2b99c267 100644
--- a/src/lj_api.c
+++ b/src/lj_api.c
@@ -1147,7 +1147,7 @@ LUA_API int lua_gc(lua_State *L, int what, int data)
1147 g->gc.threshold = LJ_MAX_MEM; 1147 g->gc.threshold = LJ_MAX_MEM;
1148 break; 1148 break;
1149 case LUA_GCRESTART: 1149 case LUA_GCRESTART:
1150 g->gc.threshold = g->gc.total; 1150 g->gc.threshold = data == -1 ? (g->gc.total/100)*g->gc.pause : g->gc.total;
1151 break; 1151 break;
1152 case LUA_GCCOLLECT: 1152 case LUA_GCCOLLECT:
1153 lj_gc_fullgc(L); 1153 lj_gc_fullgc(L);
diff --git a/src/luajit.c b/src/luajit.c
index cc2bf710..e8024479 100644
--- a/src/luajit.c
+++ b/src/luajit.c
@@ -470,7 +470,7 @@ static int pmain(lua_State *L)
470 LUAJIT_VERSION_SYM(); /* linker-enforced version check */ 470 LUAJIT_VERSION_SYM(); /* linker-enforced version check */
471 lua_gc(L, LUA_GCSTOP, 0); /* stop collector during initialization */ 471 lua_gc(L, LUA_GCSTOP, 0); /* stop collector during initialization */
472 luaL_openlibs(L); /* open libraries */ 472 luaL_openlibs(L); /* open libraries */
473 lua_gc(L, LUA_GCRESTART, 0); 473 lua_gc(L, LUA_GCRESTART, -1);
474 s->status = handle_luainit(L); 474 s->status = handle_luainit(L);
475 if (s->status != 0) return 0; 475 if (s->status != 0) return 0;
476 script = collectargs(argv, &has_i, &has_v, &has_e); 476 script = collectargs(argv, &has_i, &has_v, &has_e);