Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2a99f199
Commit
2a99f199
authored
Jul 10, 2019
by
antirez
Browse files
Merge branch 'unstable' of github.com:/antirez/redis into unstable
parents
dad0e916
75673230
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/object.c
View file @
2a99f199
...
...
@@ -834,7 +834,9 @@ size_t objectComputeSize(robj *o, size_t sample_size) {
d
=
((
zset
*
)
o
->
ptr
)
->
dict
;
zskiplist
*
zsl
=
((
zset
*
)
o
->
ptr
)
->
zsl
;
zskiplistNode
*
znode
=
zsl
->
header
->
level
[
0
].
forward
;
asize
=
sizeof
(
*
o
)
+
sizeof
(
zset
)
+
(
sizeof
(
struct
dictEntry
*
)
*
dictSlots
(
d
));
asize
=
sizeof
(
*
o
)
+
sizeof
(
zset
)
+
sizeof
(
zskiplist
)
+
sizeof
(
dict
)
+
(
sizeof
(
struct
dictEntry
*
)
*
dictSlots
(
d
))
+
zmalloc_size
(
zsl
->
header
);
while
(
znode
!=
NULL
&&
samples
<
sample_size
)
{
elesize
+=
sdsAllocSize
(
znode
->
ele
);
elesize
+=
sizeof
(
struct
dictEntry
)
+
zmalloc_size
(
znode
);
...
...
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