diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-07-27 19:53:29 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-07-27 19:53:29 +0000 |
commit | a5477c7bb9a9ae43bcdea6cdcf4a3335a78c3810 (patch) | |
tree | f3e96b26d1de7f4024bab49b143c52a1da089fda /src/or | |
parent | bc9a7be9432c779a4e47c8a58a33b5cfbc23e58e (diff) | |
download | tor-a5477c7bb9a9ae43bcdea6cdcf4a3335a78c3810.tar.gz tor-a5477c7bb9a9ae43bcdea6cdcf4a3335a78c3810.zip |
r13944@catbus: nickm | 2007-07-27 15:52:35 -0400
Fix warnings on platforms where rlim values can be signed.
Add an 8k buffer freelist.
svn:r10948
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/buffers.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 1087a7a6fa..05132fa196 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -178,10 +178,11 @@ typedef struct free_mem_list_t { /** Freelists to hold 4k and 16k memory chunks. This seems to be what * we use most. */ static free_mem_list_t free_mem_list_4k = { NULL, 0, 0, 4096, 16, INT_MAX }; -static free_mem_list_t free_mem_list_16k = { NULL, 0, 0, 16384, 4, 128 }; +static free_mem_list_t free_mem_list_8k = { NULL, 0, 0, 8192 , 8, 128 }; +static free_mem_list_t free_mem_list_16k = { NULL, 0, 0, 16384, 4, 64 }; /** Macro: True iff the size is one for which we keep a freelist. */ -#define IS_FREELIST_SIZE(sz) ((sz) == 4096 || (sz) == 16384) +#define IS_FREELIST_SIZE(sz) ((sz) == 4096 || (sz) == 8192 || (sz) == 16384) /** Return the proper freelist for chunks of size <b>sz</b>, or fail * with an assertion. */ @@ -190,6 +191,8 @@ get_free_mem_list(size_t sz) { if (sz == 4096) { return &free_mem_list_4k; + } else if (sz == 8192) { + return &free_mem_list_8k; } else { tor_assert(sz == 16384); return &free_mem_list_16k; |