diff options
author | Wang Yuan <wangyuan21@baidu.com> | 2021-06-08 18:40:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 13:40:12 +0300 |
commit | c396fd91a039feb5114e79f6f91459a0b1f74346 (patch) | |
tree | 403783bd42716a034148413023fb9f5abb5d974f /README.md | |
parent | 119121c739ea3d3d7473945d13579191fc44d226 (diff) | |
download | redis-c396fd91a039feb5114e79f6f91459a0b1f74346.tar.gz |
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.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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*: |