]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: session: release a few other pools when stopping
authorWilly Tarreau <w@1wt.eu>
Thu, 13 Nov 2014 15:46:28 +0000 (16:46 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 13 Nov 2014 15:56:12 +0000 (16:56 +0100)
We currently release all pools when a proxy is stopped, except the
connection, pendconn, and pipe pools. Doing so can improve further
reduce memory usage of old processes, eventhough the connection struct
is quite small, but there are a lot and they can participate to memory
fragmentation. The pipe pool is very small and limited, and not exported
so it's not done here.

src/session.c

index aeaa7e1b9f82e31753d29a06f20121f707fe4971..675f26df3d5a6e0c0cc99dbafbdda547fdf1c141 100644 (file)
@@ -670,6 +670,8 @@ static void session_free(struct session *s)
                pool_flush2(pool2_requri);
                pool_flush2(pool2_capture);
                pool_flush2(pool2_session);
+               pool_flush2(pool2_connection);
+               pool_flush2(pool2_pendconn);
                pool_flush2(fe->req_cap_pool);
                pool_flush2(fe->rsp_cap_pool);
        }