From 6f331645c75e88ec4f6dbabce5a2d3733894dd78 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 11 Feb 2015 09:03:50 -0500 Subject: 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. --- src/or/main.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'src/or/main.c') 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;ioutbuf) - 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(); -- cgit v1.2.3-54-g00ecf