[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] tie MAX_DIR_SIZE to MAX_BUF_SIZE



Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	buffers.c or.h test.c 
Log Message:
tie MAX_DIR_SIZE to MAX_BUF_SIZE
resolve bug 80


Index: buffers.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- buffers.c	1 Apr 2005 20:15:55 -0000	1.131
+++ buffers.c	7 Apr 2005 22:13:16 -0000	1.132
@@ -22,8 +22,6 @@
 
 /** Size, in bytes, for newly allocated buffers.  Should be a power of 2. */
 #define INITIAL_BUF_SIZE (4*1024)
-/** Maximum size, in bytes, for resized buffers. */
-#define MAX_BUF_SIZE (1024*1024*10)
 /** Size, in bytes, for minimum 'shrink' size for buffers.  Buffers may start
  * out smaller than this, but they will never autoshrink to less
  * than this size. */

Index: or.h
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.591
retrieving revision 1.592
diff -u -d -r1.591 -r1.592
--- or.h	7 Apr 2005 21:07:19 -0000	1.591
+++ or.h	7 Apr 2005 22:13:16 -0000	1.592
@@ -154,7 +154,9 @@
 #define MAX_NICKNAME_LEN 19
 /* Hex digest plus dollar sign. */
 #define MAX_HEX_NICKNAME_LEN (HEX_DIGEST_LEN+1)
-#define MAX_DIR_SIZE 500000
+/** Maximum size, in bytes, for resized buffers. */
+#define MAX_BUF_SIZE ((1<<24)-1)
+#define MAX_DIR_SIZE MAX_BUF_SIZE
 
 /* For http parsing */
 #define MAX_HEADERS_SIZE 50000

Index: test.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/test.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -d -r1.171 -r1.172
--- test.c	1 Apr 2005 20:15:56 -0000	1.171
+++ test.c	7 Apr 2005 22:13:17 -0000	1.172
@@ -118,7 +118,6 @@
 
 static void
 test_buffers(void) {
-#define MAX_BUF_SIZE 1024*1024
   char str[256];
   char str2[256];