summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-05-22 16:27:29 -0400
committerNick Mathewson <nickm@torproject.org>2014-05-22 16:27:29 -0400
commit1a73e178011d24ad2ef252dab7256d7c4fa94a64 (patch)
tree35990ad7f447fcebe8422aed4b66047f9fec2d29 /src/or/main.c
parentfef65fa64341fb70df0e7b34d91d3b08a74e7aad (diff)
parent170e0df7417e78f7b689f3189e7a0b5b8dfd2722 (diff)
downloadtor-1a73e178011d24ad2ef252dab7256d7c4fa94a64.tar.gz
tor-1a73e178011d24ad2ef252dab7256d7c4fa94a64.zip
Merge remote-tracking branch 'andrea/bug11476'
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 025b5192b5..1168f43c9d 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1522,7 +1522,9 @@ run_scheduled_events(time_t now)
if (conn->inbuf)
buf_shrink(conn->inbuf);
});
+#ifdef ENABLE_MEMPOOL
clean_cell_pool();
+#endif /* ENABLE_MEMPOOL */
buf_shrink_freelists(0);
/** How often do we check buffers and pools for empty space that can be
* deallocated? */
@@ -1927,8 +1929,10 @@ do_main_loop(void)
}
}
+#ifdef ENABLE_MEMPOOLS
/* Set up the packed_cell_t memory pool. */
init_cell_pool();
+#endif /* ENABLE_MEMPOOLS */
/* Set up our buckets */
connection_bucket_init();
@@ -2545,7 +2549,9 @@ tor_free_all(int postfork)
router_free_all();
policies_free_all();
}
+#ifdef ENABLE_MEMPOOLS
free_cell_pool();
+#endif /* ENABLE_MEMPOOLS */
if (!postfork) {
tor_tls_free_all();
#ifndef _WIN32