diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-02-11 09:03:50 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-02-11 09:03:50 -0500 |
commit | 6f331645c75e88ec4f6dbabce5a2d3733894dd78 (patch) | |
tree | 71c5a03b004043c2b5c41fa353392be1e913d075 /src/or/circuitlist.c | |
parent | 0c81dfa848da160b02818771626a425cd27b86bc (diff) | |
download | tor-6f331645c75e88ec4f6dbabce5a2d3733894dd78.tar.gz tor-6f331645c75e88ec4f6dbabce5a2d3733894dd78.zip |
Remove mempools and buf freelists
They have been off-by-default since 0.2.5 and nobody has complained. :)
Also remove the buf_shrink() function, which hasn't done anything
since we first stopped using contiguous memory to store buffers.
Closes ticket 14848.
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index d964e66922..5355b17c1d 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -2063,17 +2063,6 @@ circuits_handle_oom(size_t current_allocation) "MaxMemInQueues.)"); { - const size_t recovered = buf_shrink_freelists(1); - if (recovered >= current_allocation) { - log_warn(LD_BUG, "We somehow recovered more memory from freelists " - "than we thought we had allocated"); - current_allocation = 0; - } else { - current_allocation -= recovered; - } - } - - { size_t mem_target = (size_t)(get_options()->MaxMemInQueues * FRACTION_OF_DATA_TO_RETAIN_ON_OOM); if (current_allocation <= mem_target) @@ -2156,12 +2145,6 @@ circuits_handle_oom(size_t current_allocation) done_recovering_mem: -#ifdef ENABLE_MEMPOOLS - clean_cell_pool(); /* In case this helps. */ -#endif /* ENABLE_MEMPOOLS */ - buf_shrink_freelists(1); /* This is necessary to actually release buffer - chunks. */ - log_notice(LD_GENERAL, "Removed "U64_FORMAT" bytes by killing %d circuits; " "%d circuits remain alive. Also killed %d non-linked directory " "connections.", |