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/main.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/main.c')
-rw-r--r-- | src/or/main.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/or/main.c b/src/or/main.c index 136043c117..09144cb1fb 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1223,7 +1223,6 @@ run_scheduled_events(time_t now) static time_t time_to_check_v3_certificate = 0; static time_t time_to_check_listeners = 0; static time_t time_to_download_networkstatus = 0; - static time_t time_to_shrink_memory = 0; static time_t time_to_try_getting_descriptors = 0; static time_t time_to_reset_descriptor_failures = 0; static time_t time_to_add_entropy = 0; @@ -1573,22 +1572,6 @@ run_scheduled_events(time_t now) for (i=0;i<smartlist_len(connection_array);i++) { run_connection_housekeeping(i, now); } - if (time_to_shrink_memory < now) { - SMARTLIST_FOREACH(connection_array, connection_t *, conn, { - if (conn->outbuf) - buf_shrink(conn->outbuf); - 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? */ -#define MEM_SHRINK_INTERVAL (60) - time_to_shrink_memory = now + MEM_SHRINK_INTERVAL; - } /* 6. And remove any marked circuits... */ circuit_close_all_marked(); @@ -2260,7 +2243,6 @@ dumpmemusage(int severity) dump_routerlist_mem_usage(severity); dump_cell_pool_usage(severity); dump_dns_mem_usage(severity); - buf_dump_freelist_sizes(severity); tor_log_mallinfo(severity); } @@ -2652,7 +2634,6 @@ tor_free_all(int postfork) channel_free_all(); connection_free_all(); scheduler_free_all(); - buf_shrink_freelists(1); memarea_clear_freelist(); nodelist_free_all(); microdesc_free_all(); |