tie MAX_DIR_SIZE to MAX_BUF_SIZE

resolve bug 80


svn:r4052
This commit is contained in:
Roger Dingledine
2005-04-07 22:13:17 +00:00
parent dabafddb82
commit 97637549bb
3 changed files with 3 additions and 4 deletions
-2
View File
@@ -22,8 +22,6 @@ struct buf_t {
/** 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. */
+3 -1
View File
@@ -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
-1
View File
@@ -118,7 +118,6 @@ remove_directory(void)
static void
test_buffers(void) {
#define MAX_BUF_SIZE 1024*1024
char str[256];
char str2[256];