summaryrefslogtreecommitdiff
path: root/sizes.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2020-05-22 17:18:12 -0700
committerdormando <dormando@rydia.net>2020-06-09 16:30:00 -0700
commitd343e53b5a2f1dbab8ea79ea5d84a5937760e24b (patch)
tree29710cbc0a963c35564c3baa22f09c04def850d9 /sizes.c
parentcdeb988c28ca44d02e14c94467331af614cb976f (diff)
downloadmemcached-d343e53b5a2f1dbab8ea79ea5d84a5937760e24b.tar.gz
net: carve response buffers from read buffers
balancing start arguments for memory limits on read vs response buffers is hard. with this change there's a custom sub-allocator that cuts the small response objects out of larger read objects. it is somewhat complicated and has a few loops. the allocation path is short circuited as much as possible.
Diffstat (limited to 'sizes.c')
-rw-r--r--sizes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sizes.c b/sizes.c
index 4fb5388..459eea7 100644
--- a/sizes.c
+++ b/sizes.c
@@ -22,6 +22,9 @@ int main(int argc, char **argv) {
display("Libevent thread",
sizeof(LIBEVENT_THREAD) - sizeof(struct thread_stats));
display("Connection", sizeof(conn));
+ display("Response object", sizeof(mc_resp));
+ display("Response bundle", sizeof(mc_resp_bundle));
+ display("Response objects per bundle", MAX_RESP_PER_BUNDLE);
printf("----------------------------------------\n");