Unverified Commit 8627751e authored by Wang Yuan's avatar Wang Yuan Committed by GitHub
Browse files

Make aof buf alloc size more accurate in overhead (#8970)



In theory we should have used zmalloc_usable_size, but it may be slower,
and now after #7875, there's no actual difference.
So this change isn't making a dramatic change.
Co-authored-by: default avatarOran Agra <oran@redislabs.com>
parent 0b2d0be3
...@@ -342,7 +342,7 @@ size_t freeMemoryGetNotCountedMemory(void) { ...@@ -342,7 +342,7 @@ size_t freeMemoryGetNotCountedMemory(void) {
} }
} }
if (server.aof_state != AOF_OFF) { if (server.aof_state != AOF_OFF) {
overhead += sdsalloc(server.aof_buf)+aofRewriteBufferSize(); overhead += sdsAllocSize(server.aof_buf)+aofRewriteBufferSize();
} }
return overhead; return overhead;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment