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
This commit is contained in:
Nick Mathewson
2008-04-08 17:29:05 +00:00
parent a627407fcb
commit 31153d6374
3 changed files with 54 additions and 12 deletions
+2
View File
@@ -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();