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
8b070b5d
Commit
8b070b5d
authored
Oct 31, 2016
by
Guy Benoish
Browse files
Fixed wrong sizeof(client) in object.c
parent
f39e7d4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/object.c
View file @
8b070b5d
...
...
@@ -828,9 +828,9 @@ struct redisMemOverhead *getMemoryOverheadData(void) {
listRewind
(
server
.
slaves
,
&
li
);
while
((
ln
=
listNext
(
&
li
)))
{
client
*
c
lient
=
listNodeValue
(
ln
);
mem
+=
getClientOutputBufferMemoryUsage
(
c
lient
);
mem
+=
sdsAllocSize
(
c
lient
->
querybuf
);
client
*
c
=
listNodeValue
(
ln
);
mem
+=
getClientOutputBufferMemoryUsage
(
c
);
mem
+=
sdsAllocSize
(
c
->
querybuf
);
mem
+=
sizeof
(
client
);
}
}
...
...
@@ -844,11 +844,11 @@ struct redisMemOverhead *getMemoryOverheadData(void) {
listRewind
(
server
.
clients
,
&
li
);
while
((
ln
=
listNext
(
&
li
)))
{
client
*
c
lient
=
listNodeValue
(
ln
);
if
(
c
lient
->
flags
&
CLIENT_SLAVE
)
client
*
c
=
listNodeValue
(
ln
);
if
(
c
->
flags
&
CLIENT_SLAVE
)
continue
;
mem
+=
getClientOutputBufferMemoryUsage
(
c
lient
);
mem
+=
sdsAllocSize
(
c
lient
->
querybuf
);
mem
+=
getClientOutputBufferMemoryUsage
(
c
);
mem
+=
sdsAllocSize
(
c
->
querybuf
);
mem
+=
sizeof
(
client
);
}
}
...
...
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