[dovecot-cvs] dovecot/src/lib data-stack.c,1.5,1.6

cras at procontrol.fi cras at procontrol.fi
Sun Dec 1 17:45:51 EET 2002


Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv4513/lib

Modified Files:
	data-stack.c 
Log Message:
DEBUG: we get warnings when growing/shrinking data stack.



Index: data-stack.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/data-stack.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- data-stack.c	29 Oct 2002 05:12:50 -0000	1.5
+++ data-stack.c	1 Dec 2002 15:45:49 -0000	1.6
@@ -119,9 +119,17 @@
 	   unused_block, replace it */
 	while (block != NULL) {
 		if (unused_block == NULL || block->size > unused_block->size) {
+#ifdef DEBUG
+			i_warning("Shrinking data stack with: %"PRIuSIZE_T,
+				  unused_block->size);
+#endif
 			free(unused_block);
 			unused_block = block;
 		} else {
+#ifdef DEBUG
+			i_warning("Shrinking data stack with: %"PRIuSIZE_T,
+				  block->size);
+#endif
 			free(block);
 		}
 
@@ -226,6 +234,9 @@
 		unused_block = NULL;
 	} else {
 		block = mem_block_alloc(size);
+#ifdef DEBUG
+		i_warning("Growing data stack with: %"PRIuSIZE_T, block->size);
+#endif
 	}
 
 	block->left = block->size;




More information about the dovecot-cvs mailing list