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. */
| 3167 | * the caller wishes. The main usage of this function currently is |
| 3168 | * enforcing the client output length limits. */ |
| 3169 | unsigned long getClientOutputBufferMemoryUsage(client *c) { |
| 3170 | unsigned long list_item_size = sizeof(listNode) + sizeof(clientReplyBlock); |
| 3171 | return c->reply_bytes + (list_item_size*listLength(c->reply)); |
| 3172 | } |
| 3173 | |
| 3174 | /* Get the class of a client, used in order to enforce limits to different |
| 3175 | * classes of clients. |
no outgoing calls
no test coverage detected