diff options
Diffstat (limited to 'src/networking.c')
-rw-r--r-- | src/networking.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c index 12f8d2e9f..fc3746fd9 100644 --- a/src/networking.c +++ b/src/networking.c @@ -33,6 +33,13 @@ static void setProtocolError(redisClient *c, int pos); +/* Return the size consumed from the allocator, for the specified SDS string, + * including internal fragmentation. This function is used in order to compute + * the client output buffer size. */ +size_t sdsZmallocSize(sds s) { + void *sh = sdsAllocPtr(s); + return zmalloc_size(sh); +} /* Return the amount of memory used by the sds string at object->ptr * for a string object. */ |