]> 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)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 27 Aug 2018 05:51:39 +0000 (05:51 +0000)
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 1c2205fd691128c303e92ff1f512671506d73b73..ac8e1253229295c35f3fb5be860df5f255e8d4c4 100644 (file)
@@ -3040,7 +3040,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 3b384fa859aaedf8084b191f0f27f89e61ea57cd..45fc77c7e5f9e45a74882cdc97ec5de9fad0f803 100644 (file)
@@ -1730,7 +1730,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 b1fb53ff93fe078456d845163c530c7cee1bc3aa..0d0638a753c1313b0be7f21c4f33fe47cd0fddde 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 7d086c28104d5c4167ecf26aaa6a6e21f800bb90..b1bdf5253e521457f0779c47e85c5e977ec61a32 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 928c499baad31998917bd777750502eca4367933..9076d8f2d4ff065e74918ff0f52eb84315169e28 100644 (file)
@@ -810,7 +810,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;