diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-01-12 13:59:50 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-01-12 13:59:50 -0500 |
commit | cacea9102a2431ce8e7e431629a91a43331ac9f9 (patch) | |
tree | f00119efab4dd7ad417f24df5ca7992926e02992 /src/or/relay.c | |
parent | c2e200cef8b910434d8b5d251597081935392377 (diff) | |
download | tor-cacea9102a2431ce8e7e431629a91a43331ac9f9.tar.gz tor-cacea9102a2431ce8e7e431629a91a43331ac9f9.zip |
reindent cell_queues_check_size()
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 28211ff8ff..f878c9d78b 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -2451,20 +2451,20 @@ cell_queues_check_size(void) alloc += rend_cache_total; if (alloc >= get_options()->MaxMemInQueues_low_threshold) { last_time_under_memory_pressure = approx_time(); - if (alloc >= get_options()->MaxMemInQueues) { - /* If we're spending over 20% of the memory limit on hidden service - * descriptors, free them until we're down to 10%. - */ - if (rend_cache_total > get_options()->MaxMemInQueues / 5) { - const size_t bytes_to_remove = - rend_cache_total - (get_options()->MaxMemInQueues / 10); - rend_cache_clean_v2_descs_as_dir(time(NULL), bytes_to_remove); - alloc -= rend_cache_total; - alloc += rend_cache_get_total_allocation(); + if (alloc >= get_options()->MaxMemInQueues) { + /* If we're spending over 20% of the memory limit on hidden service + * descriptors, free them until we're down to 10%. + */ + if (rend_cache_total > get_options()->MaxMemInQueues / 5) { + const size_t bytes_to_remove = + rend_cache_total - (get_options()->MaxMemInQueues / 10); + rend_cache_clean_v2_descs_as_dir(time(NULL), bytes_to_remove); + alloc -= rend_cache_total; + alloc += rend_cache_get_total_allocation(); + } + circuits_handle_oom(alloc); + return 1; } - circuits_handle_oom(alloc); - return 1; - } } return 0; } |