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
fbfa0a12
Commit
fbfa0a12
authored
Oct 31, 2016
by
Salvatore Sanfilippo
Committed by
GitHub
Oct 31, 2016
Browse files
Merge pull request #3579 from guybe7/unstable
Fixed wrong sizeof(client) in object.c
parents
f39e7d4d
8b070b5d
Changes
1
Show whitespace changes
Inline
Side-by-side
src/object.c
View file @
fbfa0a12
...
...
@@ -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