]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Right-size some pools
authorAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 6 Sep 2024 05:30:43 +0000 (08:30 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:00 +0000 (10:40 +0200)
Avoids excess malloc traffic

12 files changed:
src/lib-auth-client/test-auth-client.c
src/lib-auth-client/test-auth-master.c
src/lib-http/test-http-client-errors.c
src/lib-http/test-http-server-errors.c
src/lib-smtp/smtp-client-connection.c
src/lib-smtp/smtp-server-connection.c
src/lib-smtp/smtp-submit.c
src/lib-smtp/test-smtp-client-errors.c
src/lib-smtp/test-smtp-payload.c
src/lib-smtp/test-smtp-server-errors.c
src/lib-smtp/test-smtp-submit.c
src/lib-ssl-iostream/ssl-settings.c

index 18c193919cef3a19b8b77df62d8fd2428a281950..defbbc7c6609f9c4ee9b50bda2920783f037a4a7 100644 (file)
@@ -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;
 
index bc9711a25b0ac61f845d63bd2428808f3c74ce9d..ae4389c9226d7221289c71993b234f4ca8e39611 100644 (file)
@@ -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;
 
index d5aa23e9c2b96240c0b4b0c2853d2ceb686f422d..1f66b362ab8e36a91745edcbbda8a8ab77a86188 100644 (file)
@@ -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;
 
index 49a86c63086b21a88855b1a8bef6c7deab33fa88..93ef14b4b0d9bef67357e990a1e55966477b1fc6 100644 (file)
@@ -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;
 
index 6b0a74a7ab118d1186e848bf2c4cdc66e76195dc..19e067773d7e6ba73be3959a9e3ca727c1f00637 100644 (file)
@@ -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);
index a4769dc0fbedbbb732959835da70e70feb17cba9..ee81b2066a594e6af84901f79deb43c2f0cfd3d5 100644 (file)
@@ -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;
index 5b8e23177f02aceda29ce0d17767fc02836733d2..641263484c558d392171cb725f1e8d06897d5852 100644 (file)
@@ -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;
index 5c01589a1c6a89ddb9bf0f697680139e81b6bbdf..330ffd0927771c9a8062f909f94c585a30129263 100644 (file)
@@ -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;
 
index e9f6d1ad6d340701d9372bdb73075084513b9fad..822e1c5c46b79cb91827e5f65441d01598aa1f1c 100644 (file)
@@ -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;
 
index 24f262217718a934af01eaae39edb2fb954eb37f..adf8097020a7168c8f013f73ded369b81fad04f8 100644 (file)
@@ -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;
 
index f0fba4b852c49273ff6cfd54c1bc2cf34af823aa..b19c1802d8344da9d50dff75d282262180cfc89e 100644 (file)
@@ -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;
 
index 52c68ae78a00a7545861b1ad7a829f035280a292..3c7de1a6181a6a93b1c458109832d17a840eeeaa 100644 (file)
@@ -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;