mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Merge pull request #4579 from gnuhpc/fix-memoryusage-list
Fix memory usage list bug
This commit is contained in:
commit
e509fbb8d9
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user