aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-04-08 17:29:05 +0000
committerNick Mathewson <nickm@torproject.org>2008-04-08 17:29:05 +0000
commit31153d6374317b4bfaba83fafdcde5a0f3f885de (patch)
tree7967910e0d5735b051734b375e7b3f819430bab3 /src/or
parenta627407fcba1d5b1671e5789f420e4b5f8b63f99 (diff)
downloadtor-31153d6374317b4bfaba83fafdcde5a0f3f885de.tar
tor-31153d6374317b4bfaba83fafdcde5a0f3f885de.tar.gz
r19243@catbus: nickm | 2008-04-08 13:28:59 -0400
Use a freelist to hold a few recent memarea chunks. We do a kazillion memarea allocs and frees; that cant be good for us. svn:r14319
Diffstat (limited to 'src/or')
-rw-r--r--src/or/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 1b50b4d7d..36c87df8d 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -18,6 +18,7 @@ const char main_c_id[] =
#ifdef USE_DMALLOC
#include <dmalloc.h>
#endif
+#include "memarea.h"
void evdns_shutdown(int);
@@ -1858,6 +1859,7 @@ tor_free_all(int postfork)
entry_guards_free_all();
connection_free_all();
buf_shrink_freelists(1);
+ memarea_clear_freelist();
if (!postfork) {
config_free_all();
router_free_all();