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
e509fbb8
Unverified
Commit
e509fbb8
authored
Jan 05, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Jan 05, 2018
Browse files
Merge pull request #4579 from gnuhpc/fix-memoryusage-list
Fix memory usage list bug
parents
0b561883
5113a53d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/object.c
View file @
e509fbb8
...
...
@@ -739,7 +739,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