]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: snapshots: dynamically allocate the snapshots
authorWilly Tarreau <w@1wt.eu>
Fri, 7 Sep 2018 17:02:32 +0000 (19:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Sep 2018 17:59:58 +0000 (19:59 +0200)
commitc55015ee5b9f24b2855056bbae9c95324d7e4759
tree40e0bbc4d160163f9fa6472aef8606c051986161
parent36b2736a6952c2853be5d729b5ca53fcc86eb2f2
MEDIUM: snapshots: dynamically allocate the snapshots

Now upon error we dynamically allocate the snapshot instead of overwriting
it. This way there is no more memory wasted in the proxy to hold the two
error snapshot descriptors. Also an appreciable side effect of this is that
the proxy's lock is only taken during the pointer swap, no more while copying
the buffer's contents. This saves 480 bytes of memory per proxy.
include/types/proxy.h
src/proxy.c