aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-18 17:28:50 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-18 17:28:50 +0000
commitc67bd8048781aac8ba8c6e55d4e5af393fd3b024 (patch)
tree9c9d8228c3d27818fd4f27274421b9bf0c0c128d /src
parentc3e4b12e7f0cc123114d60222c1cb4a47a85551f (diff)
downloadtor-c67bd8048781aac8ba8c6e55d4e5af393fd3b024.tar
tor-c67bd8048781aac8ba8c6e55d4e5af393fd3b024.tar.gz
Make cell pools always-on.
svn:r17692
Diffstat (limited to 'src')
-rw-r--r--src/or/relay.c41
1 files changed, 1 insertions, 40 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 5dbed49b4..350bf802f 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1426,10 +1426,8 @@ circuit_consider_sending_sendme(circuit_t *circ, crypt_path_t *layer_hint)
/** The total number of cells we have allocated from the memory pool. */
static int total_cells_allocated = 0;
-#ifdef ENABLE_CELL_POOL /* Defined in ./configure. True by default. */
-/* XXX021 make cell pools the only option once we know they work and improve
- * matters? -RD */
static mp_pool_t *cell_pool = NULL;
+
/** Allocate structures to hold cells. */
void
init_cell_pool(void)
@@ -1488,43 +1486,6 @@ dump_cell_pool_usage(int severity)
n_cells, n_circs, total_cells_allocated - n_cells);
mp_pool_log_status(cell_pool, severity);
}
-#else
-/* ENABLE_CELL_POOL isn't defined: here are some stubs to use tor_malloc()
- * and tor_free() instead. */
-void
-init_cell_pool(void)
-{
-}
-
-void
-free_cell_pool(void)
-{
-}
-
-void
-clean_cell_pool(void)
-{
-}
-
-static INLINE void
-packed_cell_free(packed_cell_t *cell)
-{
- --total_cells_allocated;
- tor_free(cell);
-}
-
-static INLINE packed_cell_t *
-packed_cell_alloc(void)
-{
- ++total_cells_allocated;
- return tor_malloc(sizeof(packed_cell_t));
-}
-void
-dump_cell_pool_usage(int severity)
-{
- (void) severity;
-}
-#endif
/** Allocate a new copy of packed <b>cell</b>. */
static INLINE packed_cell_t *