dovecot-2.0-sslstream: Minor memory allocation tweaks.

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:55:48 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/c84c4f705e69
changeset: 10215:c84c4f705e69
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Oct 28 14:10:17 2009 -0400
description:
Minor memory allocation tweaks.

diffstat:

2 files changed, 2 insertions(+), 2 deletions(-)
src/lib/failures.c |    2 +-
src/lib/str.c      |    2 +-

diffs (24 lines):

diff -r 6c32cc350164 -r c84c4f705e69 src/lib/failures.c
--- a/src/lib/failures.c	Wed Oct 28 13:51:53 2009 -0400
+++ b/src/lib/failures.c	Wed Oct 28 14:10:17 2009 -0400
@@ -522,7 +522,7 @@ internal_handler(enum log_type log_type,
 		string_t *str;
 		unsigned int prefix_len;
 
-		str = t_str_new(512);
+		str = t_str_new(128);
 		str_printfa(str, "\001%c%s ", log_type + 1, my_pid);
 		prefix_len = str_len(str);
 
diff -r 6c32cc350164 -r c84c4f705e69 src/lib/str.c
--- a/src/lib/str.c	Wed Oct 28 13:51:53 2009 -0400
+++ b/src/lib/str.c	Wed Oct 28 14:10:17 2009 -0400
@@ -129,7 +129,7 @@ void str_printfa(string_t *str, const ch
 
 void str_vprintfa(string_t *str, const char *fmt, va_list args)
 {
-#define SNPRINTF_INITIAL_EXTRA_SIZE 256
+#define SNPRINTF_INITIAL_EXTRA_SIZE 128
 	va_list args2;
 	char *tmp;
 	unsigned int init_size;


More information about the dovecot-cvs mailing list