Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
40531be0
Commit
40531be0
authored
May 07, 2011
by
antirez
Browse files
call lua_gc() for incremental garbage collection. Likely there is to tune this at some point.
parent
c2a7dd85
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
40531be0
...
@@ -380,8 +380,10 @@ void evalCommand(redisClient *c) {
...
@@ -380,8 +380,10 @@ void evalCommand(redisClient *c) {
addReplyErrorFormat
(
c
,
"Error running script (call to %s): %s
\n
"
,
addReplyErrorFormat
(
c
,
"Error running script (call to %s): %s
\n
"
,
funcname
,
lua_tostring
(
lua
,
-
1
));
funcname
,
lua_tostring
(
lua
,
-
1
));
lua_pop
(
lua
,
1
);
lua_pop
(
lua
,
1
);
lua_gc
(
lua
,
LUA_GCCOLLECT
,
0
);
return
;
return
;
}
}
selectDb
(
c
,
server
.
lua_client
->
db
->
id
);
/* set DB ID from Lua client */
selectDb
(
c
,
server
.
lua_client
->
db
->
id
);
/* set DB ID from Lua client */
luaReplyToRedisReply
(
c
,
lua
);
luaReplyToRedisReply
(
c
,
lua
);
lua_gc
(
lua
,
LUA_GCSTEP
,
1
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment