This function returns the number of bytes that Redis is * using to store the reply still not read by the client. * * Note: this function is very fast so can be called as many time as * the caller wishes. The main usage of this function currently is * enforcing the client output length limits. */
| 3810 | * the caller wishes. The main usage of this function currently is |
| 3811 | * enforcing the client output length limits. */ |
| 3812 | unsigned long getClientOutputBufferMemoryUsage(client *c) { |
| 3813 | unsigned long list_item_size = sizeof(listNode) + sizeof(clientReplyBlock); |
| 3814 | return c->reply_bytes + (list_item_size*listLength(c->reply)) + (c->replyAsync ? c->replyAsync->size : 0) + getClientReplicationBacklogSharedUsage(c); |
| 3815 | } |
| 3816 | |
| 3817 | |
| 3818 |
no test coverage detected