]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: Increase memory pool initial sizes
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 23 Aug 2018 16:15:50 +0000 (19:15 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 25 Sep 2018 10:29:09 +0000 (13:29 +0300)
This reduces malloc traffic

src/lib-http/test-http-client-errors.c
src/lib-smtp/smtp-client-connection.c
src/lib-smtp/smtp-client-transaction.c
src/lib-smtp/smtp-reply-parser.c
src/lib-smtp/smtp-server-command.c
src/lib-smtp/smtp-server-connection.c
src/lib-smtp/smtp-server-transaction.c

index 3ccc6b504dc7cc81220ac241127ece62eb90962e..1b8d80c4183fde6420f7f661bd92f1848b79f04c 100644 (file)
@@ -2988,7 +2988,7 @@ 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 c5ceabe8ce34b8b13a0c06a6f9100f8626257003..bbb67e2a1ae041bd0c5c40e9a49790bea0284dd2 100644 (file)
@@ -1622,7 +1622,7 @@ smtp_client_connection_create(struct smtp_client *client,
        struct smtp_client_connection *conn;
        pool_t pool;
 
-       pool = pool_alloconly_create("smtp client connection", 512);
+       pool = pool_alloconly_create("smtp client connection", 2048);
        conn = p_new(pool, struct smtp_client_connection, 1);
        conn->refcount = 1;
        conn->pool = pool;
index dc78e6a15a7c8ec372d0a02dedac1ba2f77bd71c..6cf8c9a8e2e2f3edb39cff85a2f641e7e4ecb7b7 100644 (file)
@@ -45,7 +45,7 @@ smtp_client_transaction_rcpt_new(
        struct smtp_client_transaction_rcpt *rcpt;
        pool_t pool;
 
-       pool = pool_alloconly_create("smtp transaction rcpt", 256);
+       pool = pool_alloconly_create("smtp transaction rcpt", 512);
        rcpt = p_new(pool, struct smtp_client_transaction_rcpt, 1);
        rcpt->pool = pool;
        rcpt->trans = trans;
@@ -163,7 +163,7 @@ smtp_client_transaction_create(struct smtp_client_connection *conn,
        struct smtp_client_transaction *trans;
        pool_t pool;
 
-       pool = pool_alloconly_create("smtp transaction", 512);
+       pool = pool_alloconly_create("smtp transaction", 4096);
        trans = p_new(pool, struct smtp_client_transaction, 1);
        trans->refcount = 1;
        trans->pool = pool;
index 78cf947fbc23b5d0c446afc514981dda52ba8120..d47eab4513b8ddef4912295bf02670f0593ac181 100644 (file)
@@ -146,7 +146,7 @@ smtp_reply_parser_restart(struct smtp_reply_parser *parser)
        pool_unref(&parser->reply_pool);
        i_zero(&parser->state);
 
-       parser->reply_pool = pool_alloconly_create("smtp_reply", 256);
+       parser->reply_pool = pool_alloconly_create("smtp_reply", 1024);
        parser->state.reply = p_new(parser->reply_pool, struct smtp_reply, 1);
        p_array_init(&parser->state.reply_lines, parser->reply_pool, 8);
 
index 915dc0787c1b997ef7211cfdf19cb09901eacbdb..cdc7b1b5b3d8fc6cba2071702897baf592069706 100644 (file)
@@ -154,7 +154,7 @@ smtp_server_command_alloc(struct smtp_server_connection *conn)
        struct smtp_server_command *cmd;
        pool_t pool;
 
-       pool = pool_alloconly_create("smtp_server_command", 256);
+       pool = pool_alloconly_create("smtp_server_command", 1024);
        cmd = p_new(pool, struct smtp_server_command, 1);
        cmd->context.pool = pool;
        cmd->context.cmd = cmd;
index a6709cdd96288892f25293321a8cf86b4591a3e2..ff705fba58573d795e84ddabec70e7021d7fb0eb 100644 (file)
@@ -770,7 +770,7 @@ smtp_server_connection_alloc(struct smtp_server *server,
        struct smtp_server_connection *conn;
        pool_t pool;
 
-       pool = pool_alloconly_create("smtp server", 512);
+       pool = pool_alloconly_create("smtp server", 1024);
        conn = p_new(pool, struct smtp_server_connection, 1);
        conn->pool = pool;
        conn->refcount = 1;
index 9c3e6bb3b0f0c53f6c3750919bf374670880d76f..753b355b2732416dcd1848f416be6ab8bd602488 100644 (file)
@@ -23,7 +23,7 @@ smtp_server_transaction_create(struct smtp_server_connection *conn,
        string_t *id;
 
        /* create new transaction */
-       pool = pool_alloconly_create("smtp server transaction", 512);
+       pool = pool_alloconly_create("smtp server transaction", 4096);
        trans = p_new(pool, struct smtp_server_transaction, 1);
        trans->pool = pool;
        trans->conn = conn;