OPTIM/MINOR: move the hdr_idx pools out of the proxy struct
It makes no sense to have one pointer to the hdr_idx pool in each proxy
struct since these pools do not depend on the proxy. Let's have a common
pool instead as it is already the case for other types.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index ed64457..dac6bca 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -44,6 +44,7 @@
#include <proto/checks.h>
#include <proto/dumpstats.h>
#include <proto/frontend.h>
+#include <proto/hdr_idx.h>
#include <proto/lb_chash.h>
#include <proto/lb_fwlc.h>
#include <proto/lb_fwrr.h>
@@ -5991,10 +5992,6 @@
curproxy->nb_rsp_cap * sizeof(char *),
MEM_F_SHARED);
- curproxy->hdr_idx_pool = create_pool("hdr_idx",
- MAX_HTTP_HDR * sizeof(struct hdr_idx_elem),
- MEM_F_SHARED);
-
/* first, we will invert the servers list order */
newsrv = NULL;
while (curproxy->srv) {
@@ -6598,6 +6595,10 @@
}
}
+ pool2_hdr_idx = create_pool("hdr_idx",
+ MAX_HTTP_HDR * sizeof(struct hdr_idx_elem),
+ MEM_F_SHARED);
+
if (cfgerr > 0)
err_code |= ERR_ALERT | ERR_FATAL;
out: