From: Aki Tuomi Date: Fri, 6 Sep 2024 05:30:43 +0000 (+0300) Subject: global: Right-size some pools X-Git-Tag: 2.4.1~580 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4eb65ae09547c906a2bb4c2b7b2436603e2d9be;p=thirdparty%2Fdovecot%2Fcore.git global: Right-size some pools Avoids excess malloc traffic --- diff --git a/src/lib-auth-client/test-auth-client.c b/src/lib-auth-client/test-auth-client.c index 18c193919c..defbbc7c66 100644 --- a/src/lib-auth-client/test-auth-client.c +++ b/src/lib-auth-client/test-auth-client.c @@ -1082,7 +1082,7 @@ static void server_connection_init(int fd) net_set_nonblock(fd, TRUE); - pool = pool_alloconly_create("server connection", 256); + pool = pool_alloconly_create("server connection", 512); conn = p_new(pool, struct server_connection, 1); conn->pool = pool; diff --git a/src/lib-auth-client/test-auth-master.c b/src/lib-auth-client/test-auth-master.c index bc9711a25b..ae4389c922 100644 --- a/src/lib-auth-client/test-auth-master.c +++ b/src/lib-auth-client/test-auth-master.c @@ -1243,7 +1243,7 @@ static void server_connection_init(int fd) net_set_nonblock(fd, TRUE); - pool = pool_alloconly_create("server connection", 256); + pool = pool_alloconly_create("server connection", 512); conn = p_new(pool, struct server_connection, 1); conn->pool = pool; diff --git a/src/lib-http/test-http-client-errors.c b/src/lib-http/test-http-client-errors.c index d5aa23e9c2..1f66b362ab 100644 --- a/src/lib-http/test-http-client-errors.c +++ b/src/lib-http/test-http-client-errors.c @@ -3547,7 +3547,7 @@ static void server_connection_init(int fd) net_set_nonblock(fd, TRUE); - pool = pool_alloconly_create("server connection", 512); + pool = pool_alloconly_create("server connection", 1024); conn = p_new(pool, struct server_connection, 1); conn->pool = pool; diff --git a/src/lib-http/test-http-server-errors.c b/src/lib-http/test-http-server-errors.c index 49a86c6308..93ef14b4b0 100644 --- a/src/lib-http/test-http-server-errors.c +++ b/src/lib-http/test-http-server-errors.c @@ -772,7 +772,7 @@ static void client_connection_init(const struct ip_addr *ip, in_port_t port) struct client_connection *conn; pool_t pool; - pool = pool_alloconly_create("client connection", 512); + pool = pool_alloconly_create("client connection", 1024); conn = p_new(pool, struct client_connection, 1); conn->pool = pool; diff --git a/src/lib-smtp/smtp-client-connection.c b/src/lib-smtp/smtp-client-connection.c index 6b0a74a7ab..19e067773d 100644 --- a/src/lib-smtp/smtp-client-connection.c +++ b/src/lib-smtp/smtp-client-connection.c @@ -2206,7 +2206,7 @@ smtp_client_connection_do_create(struct smtp_client *client, const char *name, conn->cap_pool = pool_alloconly_create( "smtp client connection capabilities", 128); conn->state_pool = pool_alloconly_create( - "smtp client connection state", 256); + "smtp client connection state", 512); if (set != NULL && set->event_parent != NULL) conn_event = event_create(set->event_parent); diff --git a/src/lib-smtp/smtp-server-connection.c b/src/lib-smtp/smtp-server-connection.c index a4769dc0fb..ee81b2066a 100644 --- a/src/lib-smtp/smtp-server-connection.c +++ b/src/lib-smtp/smtp-server-connection.c @@ -862,7 +862,7 @@ smtp_server_connection_alloc(struct smtp_server *server, struct smtp_server_connection *conn; pool_t pool; - pool = pool_alloconly_create("smtp server", 1024); + pool = pool_alloconly_create("smtp server", 2048); conn = p_new(pool, struct smtp_server_connection, 1); conn->pool = pool; conn->refcount = 1; diff --git a/src/lib-smtp/smtp-submit.c b/src/lib-smtp/smtp-submit.c index 5b8e23177f..641263484c 100644 --- a/src/lib-smtp/smtp-submit.c +++ b/src/lib-smtp/smtp-submit.c @@ -66,7 +66,7 @@ smtp_submit_session_init(const struct smtp_submit_input *input, struct smtp_submit_session *session; pool_t pool; - pool = pool_alloconly_create("smtp submit session", 128); + pool = pool_alloconly_create("smtp submit session", 512); session = p_new(pool, struct smtp_submit_session, 1); session->pool = pool; @@ -104,7 +104,7 @@ smtp_submit_init(struct smtp_submit_session *session, struct smtp_submit *subm; pool_t pool; - pool = pool_alloconly_create("smtp submit", 256); + pool = pool_alloconly_create("smtp submit", 1024); subm = p_new(pool, struct smtp_submit, 1); subm->session = session; subm->pool = pool; diff --git a/src/lib-smtp/test-smtp-client-errors.c b/src/lib-smtp/test-smtp-client-errors.c index 5c01589a1c..330ffd0927 100644 --- a/src/lib-smtp/test-smtp-client-errors.c +++ b/src/lib-smtp/test-smtp-client-errors.c @@ -3896,7 +3896,7 @@ static void server_connection_init(int fd) net_set_nonblock(fd, TRUE); - pool = pool_alloconly_create("server connection", 256); + pool = pool_alloconly_create("server connection", 512); conn = p_new(pool, struct server_connection, 1); conn->pool = pool; diff --git a/src/lib-smtp/test-smtp-payload.c b/src/lib-smtp/test-smtp-payload.c index e9f6d1ad6d..822e1c5c46 100644 --- a/src/lib-smtp/test-smtp-payload.c +++ b/src/lib-smtp/test-smtp-payload.c @@ -399,7 +399,7 @@ static void client_init(int fd) net_set_nonblock(fd, TRUE); - pool = pool_alloconly_create("client", 256); + pool = pool_alloconly_create("client", 512); client = p_new(pool, struct client, 1); client->pool = pool; diff --git a/src/lib-smtp/test-smtp-server-errors.c b/src/lib-smtp/test-smtp-server-errors.c index 24f2622177..adf8097020 100644 --- a/src/lib-smtp/test-smtp-server-errors.c +++ b/src/lib-smtp/test-smtp-server-errors.c @@ -3576,7 +3576,7 @@ static void client_connection_init(const struct ip_addr *ip, in_port_t port) struct client_connection *conn; pool_t pool; - pool = pool_alloconly_create("client connection", 256); + pool = pool_alloconly_create("client connection", 1024); conn = p_new(pool, struct client_connection, 1); conn->pool = pool; diff --git a/src/lib-smtp/test-smtp-submit.c b/src/lib-smtp/test-smtp-submit.c index f0fba4b852..b19c1802d8 100644 --- a/src/lib-smtp/test-smtp-submit.c +++ b/src/lib-smtp/test-smtp-submit.c @@ -1900,7 +1900,7 @@ static void server_connection_init(int fd) net_set_nonblock(fd, TRUE); - pool = pool_alloconly_create("server connection", 256); + pool = pool_alloconly_create("server connection", 512); conn = p_new(pool, struct server_connection, 1); conn->pool = pool; diff --git a/src/lib-ssl-iostream/ssl-settings.c b/src/lib-ssl-iostream/ssl-settings.c index 52c68ae78a..3c7de1a618 100644 --- a/src/lib-ssl-iostream/ssl-settings.c +++ b/src/lib-ssl-iostream/ssl-settings.c @@ -168,7 +168,7 @@ static struct ssl_iostream_settings * ssl_common_settings_to_iostream_set(const struct ssl_settings *ssl_set) { struct ssl_iostream_settings *set; - pool_t pool = pool_alloconly_create("ssl iostream settings", 256); + pool_t pool = pool_alloconly_create("ssl iostream settings", 512); set = p_new(pool, struct ssl_iostream_settings, 1); pool_add_external_ref(pool, ssl_set->pool); set->pool = pool;