changeset 10214:c84c4f705e69 HEAD

Minor memory allocation tweaks.
author Timo Sirainen <tss@iki.fi>
date Wed, 28 Oct 2009 14:10:17 -0400
parents 6c32cc350164
children 728a029f56f9
files src/lib/failures.c src/lib/str.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 		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);
 
--- 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_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;