From c396fd91a039feb5114e79f6f91459a0b1f74346 Mon Sep 17 00:00:00 2001 From: Wang Yuan Date: Tue, 8 Jun 2021 18:40:12 +0800 Subject: Mem efficiency, make full use of client struct memory for reply buffers (#8968) When we allocate a client struct with 16k reply buffer, the allocator we may give us 20K, This commit makes use of that extra space. Additionally, it tries to store whatever it can from the reply into the static 'buf' before allocating a new node for the reply list. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index e4d64d58f..eecb61daa 100644 --- a/README.md +++ b/README.md @@ -304,8 +304,8 @@ struct client { redisDb *db; int flags; list *reply; - char buf[PROTO_REPLY_CHUNK_BYTES]; // ... many other fields ... + char buf[PROTO_REPLY_CHUNK_BYTES]; } ``` The client structure defines a *connected client*: -- cgit v1.2.1