From 028e7ab30db48b4742637a2b040334f1347984fb Mon Sep 17 00:00:00 2001 From: jschmieg Date: Mon, 6 Jul 2020 05:51:08 -0400 Subject: [PATCH] Optimize buffer creation in _addReplyProtoToList --- src/networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.c b/src/networking.c index 41c98cb4a4e..01a34983d91 100644 --- a/src/networking.c +++ b/src/networking.c @@ -282,7 +282,7 @@ void _addReplyProtoToList(client *c, const char *s, size_t len) { /* Create a new node, make sure it is allocated to at * least PROTO_REPLY_CHUNK_BYTES */ size_t size = len < PROTO_REPLY_CHUNK_BYTES? PROTO_REPLY_CHUNK_BYTES: len; - tail = zmalloc(size + sizeof(clientReplyBlock)); + tail = zmalloc_dram(size + sizeof(clientReplyBlock)); /* take over the allocation's internal fragmentation */ tail->size = zmalloc_usable(tail) - sizeof(clientReplyBlock); tail->used = len;