mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 09:30:55 +00:00
Merge pull request #3579 from guybe7/unstable
Fixed wrong sizeof(client) in object.c
This commit is contained in:
commit
fbfa0a12ee
14
src/object.c
14
src/object.c
@ -828,9 +828,9 @@ struct redisMemOverhead *getMemoryOverheadData(void) {
|
|||||||
|
|
||||||
listRewind(server.slaves,&li);
|
listRewind(server.slaves,&li);
|
||||||
while((ln = listNext(&li))) {
|
while((ln = listNext(&li))) {
|
||||||
client *client = listNodeValue(ln);
|
client *c = listNodeValue(ln);
|
||||||
mem += getClientOutputBufferMemoryUsage(client);
|
mem += getClientOutputBufferMemoryUsage(c);
|
||||||
mem += sdsAllocSize(client->querybuf);
|
mem += sdsAllocSize(c->querybuf);
|
||||||
mem += sizeof(client);
|
mem += sizeof(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -844,11 +844,11 @@ struct redisMemOverhead *getMemoryOverheadData(void) {
|
|||||||
|
|
||||||
listRewind(server.clients,&li);
|
listRewind(server.clients,&li);
|
||||||
while((ln = listNext(&li))) {
|
while((ln = listNext(&li))) {
|
||||||
client *client = listNodeValue(ln);
|
client *c = listNodeValue(ln);
|
||||||
if (client->flags & CLIENT_SLAVE)
|
if (c->flags & CLIENT_SLAVE)
|
||||||
continue;
|
continue;
|
||||||
mem += getClientOutputBufferMemoryUsage(client);
|
mem += getClientOutputBufferMemoryUsage(c);
|
||||||
mem += sdsAllocSize(client->querybuf);
|
mem += sdsAllocSize(c->querybuf);
|
||||||
mem += sizeof(client);
|
mem += sizeof(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user