From: antirez Date: Sat, 7 May 2011 09:32:37 +0000 (+0200) Subject: call lua_gc() for incremental garbage collection. Likely there is to tune this at... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/40531be0e338556df5510f49f4472ea50713962f call lua_gc() for incremental garbage collection. Likely there is to tune this at some point. --- 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); }