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
733af148
Commit
733af148
authored
Jan 05, 2018
by
gnuhpc
Committed by
antirez
Jan 05, 2018
Browse files
Fix memory usage list bug
parent
c9cb699b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/object.c
View file @
733af148
...
...
@@ -727,7 +727,7 @@ size_t objectComputeSize(robj *o, size_t sample_size) {
elesize
+=
sizeof
(
quicklistNode
)
+
ziplistBlobLen
(
node
->
zl
);
samples
++
;
}
while
((
node
=
node
->
next
)
&&
samples
<
sample_size
);
asize
+=
(
double
)
elesize
/
samples
*
listTypeLength
(
o
)
;
asize
+=
(
double
)
elesize
/
samples
*
ql
->
len
;
}
else
if
(
o
->
encoding
==
OBJ_ENCODING_ZIPLIST
)
{
asize
=
sizeof
(
*
o
)
+
ziplistBlobLen
(
o
->
ptr
);
}
else
{
...
...
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