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
cd8bdea3
Commit
cd8bdea3
authored
Feb 29, 2012
by
antirez
Browse files
lpush arguments vector rewrite modified for more speed and to memory leak removal.
parent
b67feeca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_list.c
View file @
cd8bdea3
...
@@ -296,8 +296,8 @@ void pushGenericCommand(redisClient *c, int where) {
...
@@ -296,8 +296,8 @@ void pushGenericCommand(redisClient *c, int where) {
* be propagated). */
* be propagated). */
if
(
waiting
&&
pushed
)
{
if
(
waiting
&&
pushed
)
{
/* CMD KEY a b C D E */
/* CMD KEY a b C D E */
for
(
j
=
2
;
j
<
pushed
+
2
;
j
++
)
for
(
j
=
0
;
j
<
waiting
;
j
++
)
decrRefCount
(
c
->
argv
[
j
+
2
]);
rewriteClientCommandArgument
(
c
,
j
,
c
->
argv
[
j
+
waiting
]
);
memmove
(
c
->
argv
+
2
,
c
->
argv
+
2
+
waiting
,
sizeof
(
robj
*
)
*
pushed
);
c
->
argc
-=
waiting
;
c
->
argc
-=
waiting
;
}
}
}
}
...
...
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