From 8627751ec64e40181e3acfc53b3e2f73a3730cb7 Mon Sep 17 00:00:00 2001 From: Wang Yuan Date: Thu, 20 May 2021 20:04:17 +0800 Subject: [PATCH] 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: Oran Agra --- src/evict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evict.c b/src/evict.c index d3cdaaa80..2f94f5942 100644 --- a/src/evict.c +++ b/src/evict.c @@ -342,7 +342,7 @@ size_t freeMemoryGetNotCountedMemory(void) { } } if (server.aof_state != AOF_OFF) { - overhead += sdsalloc(server.aof_buf)+aofRewriteBufferSize(); + overhead += sdsAllocSize(server.aof_buf)+aofRewriteBufferSize(); } return overhead; }