From 40531be0e338556df5510f49f4472ea50713962f Mon Sep 17 00:00:00 2001 From: antirez Date: Sat, 7 May 2011 11:32:37 +0200 Subject: [PATCH 1/1] call lua_gc() for incremental garbage collection. Likely there is to tune this at some point. --- src/scripting.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scripting.c b/src/scripting.c index 26e33bc7..ad00123a 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -380,8 +380,10 @@ void evalCommand(redisClient *c) { addReplyErrorFormat(c,"Error running script (call to %s): %s\n", funcname, lua_tostring(lua,-1)); lua_pop(lua,1); + lua_gc(lua,LUA_GCCOLLECT,0); return; } selectDb(c,server.lua_client->db->id); /* set DB ID from Lua client */ luaReplyToRedisReply(c,lua); + lua_gc(lua,LUA_GCSTEP,1); } -- 2.45.2