diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-10-19 15:04:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-07 10:47:07 -0500 |
commit | 6d93820499a8bfb19128759893b18c1437f99c6b (patch) | |
tree | ffd69acf9824b9c39d2ffd33f9b5e39e71512878 /src/app | |
parent | 275e831ceac6382aafb1186976a3edfadcd0c87e (diff) | |
download | tor-6d93820499a8bfb19128759893b18c1437f99c6b.tar.gz tor-6d93820499a8bfb19128759893b18c1437f99c6b.zip |
Memoize summarize_protover_flags()
Our tests showed that this function is responsible for a huge number
of our malloc/free() calls. It's a prime candidate for being
memoized.
Closes ticket 27225.
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/main/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/app/main/main.c b/src/app/main/main.c index ae87add67d..04bbfadcb7 100644 --- a/src/app/main/main.c +++ b/src/app/main/main.c @@ -33,6 +33,7 @@ #include "core/or/relay.h" #include "core/or/scheduler.h" #include "core/or/status.h" +#include "core/or/versions.h" #include "feature/api/tor_api.h" #include "feature/api/tor_api_internal.h" #include "feature/client/addressmap.h" @@ -791,6 +792,7 @@ tor_free_all(int postfork) dos_free_all(); circuitmux_ewma_free_all(); accounting_free_all(); + protover_summary_cache_free_all(); if (!postfork) { config_free_all(); |