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