diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-18 17:28:50 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-18 17:28:50 +0000 |
commit | c67bd8048781aac8ba8c6e55d4e5af393fd3b024 (patch) | |
tree | 9c9d8228c3d27818fd4f27274421b9bf0c0c128d /src/or/relay.c | |
parent | c3e4b12e7f0cc123114d60222c1cb4a47a85551f (diff) | |
download | tor-c67bd8048781aac8ba8c6e55d4e5af393fd3b024.tar.gz tor-c67bd8048781aac8ba8c6e55d4e5af393fd3b024.zip |
Make cell pools always-on.
svn:r17692
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 5dbed49b4c..350bf802f1 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 * |