dovecot-1.2: Memory usage tweaks.

dovecot at dovecot.org dovecot at dovecot.org
Mon May 18 01:36:18 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/54686141353f
changeset: 9046:54686141353f
user:      Timo Sirainen <tss at iki.fi>
date:      Sun May 17 18:36:12 2009 -0400
description:
Memory usage tweaks.

diffstat:

3 files changed, 7 insertions(+), 3 deletions(-)
src/lib-storage/mailbox-list.c        |    2 +-
src/plugins/virtual/virtual-storage.c |    2 +-
src/plugins/virtual/virtual-sync.c    |    6 +++++-

diffs (44 lines):

diff -r 1e9bb18eb439 -r 54686141353f src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Sun May 17 18:35:30 2009 -0400
+++ b/src/lib-storage/mailbox-list.c	Sun May 17 18:36:12 2009 -0400
@@ -499,7 +499,7 @@ mailbox_list_iter_init_namespaces(struct
 
 	i_assert(namespaces != NULL);
 
-	pool = pool_alloconly_create("mailbox list namespaces", 256);
+	pool = pool_alloconly_create("mailbox list namespaces", 512);
 	ctx = p_new(pool, struct ns_list_iterate_context, 1);
 	ctx->pool = pool;
 	ctx->ctx.flags = flags;
diff -r 1e9bb18eb439 -r 54686141353f src/plugins/virtual/virtual-storage.c
--- a/src/plugins/virtual/virtual-storage.c	Sun May 17 18:35:30 2009 -0400
+++ b/src/plugins/virtual/virtual-storage.c	Sun May 17 18:36:12 2009 -0400
@@ -267,7 +267,7 @@ virtual_open(struct virtual_storage *sto
 	index = index_storage_alloc(_storage, name, flags,
 				    VIRTUAL_INDEX_PREFIX);
 
-	pool = pool_alloconly_create("virtual mailbox", 1024+512);
+	pool = pool_alloconly_create(MEMPOOL_GROWING"virtual mailbox", 2048);
 	mbox = p_new(pool, struct virtual_mailbox, 1);
 	mbox->ibox.box = virtual_mailbox;
 	mbox->ibox.box.pool = pool;
diff -r 1e9bb18eb439 -r 54686141353f src/plugins/virtual/virtual-sync.c
--- a/src/plugins/virtual/virtual-sync.c	Sun May 17 18:35:30 2009 -0400
+++ b/src/plugins/virtual/virtual-sync.c	Sun May 17 18:36:12 2009 -0400
@@ -1145,11 +1145,15 @@ static int virtual_sync_backend_boxes(st
 {
 	struct virtual_backend_box *const *bboxes;
 	unsigned int i, count;
+	int ret;
 
 	i_array_init(&ctx->all_adds, 128);
 	bboxes = array_get(&ctx->mbox->backend_boxes, &count);
 	for (i = 0; i < count; i++) {
-		if (virtual_sync_backend_box(ctx, bboxes[i]) < 0) {
+		T_BEGIN {
+			ret = virtual_sync_backend_box(ctx, bboxes[i]);
+		} T_END;
+		if (ret < 0) {
 			/* backend failed, copy the error */
 			virtual_box_copy_error(&ctx->mbox->ibox.box,
 					       bboxes[i]->box);


More information about the dovecot-cvs mailing list