aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-03-04 10:54:54 -0500
committerNick Mathewson <nickm@torproject.org>2014-03-04 10:54:54 -0500
commit46118d7d7542aa960a26a08d9d5fbac33698765c (patch)
tree12b52cfd6bbec9ab8b29d97ec585c2a6c162f61b /src/or/circuitlist.c
parent05d8111eedee9e11e4bb1c42e93ae2fc168d52ec (diff)
parent833d027778ba97020fb5ded1d94e4b21fbcab766 (diff)
downloadtor-46118d7d7542aa960a26a08d9d5fbac33698765c.tar
tor-46118d7d7542aa960a26a08d9d5fbac33698765c.tar.gz
Merge remote-tracking branch 'public/bug10169_023' into bug10169_024
Conflicts: src/or/relay.c
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 3081035ab..959334e76 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -1693,7 +1693,7 @@ circuits_handle_oom(size_t current_allocation)
mem_to_recover = current_allocation - mem_target;
}
- tor_gettimeofday_cached(&now);
+ tor_gettimeofday_cached_monotonic(&now);
now_ms = (uint32_t)tv_to_msec(&now);
/* This algorithm itself assumes that you've got enough memory slack
@@ -1731,9 +1731,11 @@ circuits_handle_oom(size_t current_allocation)
buf_shrink_freelists(1); /* This is necessary to actually release buffer
chunks. */
- log_notice(LD_GENERAL, "Removed "U64_FORMAT" bytes by killing %d circuits.",
+ log_notice(LD_GENERAL, "Removed "U64_FORMAT" bytes by killing %d circuits; "
+ "%d circuits remain alive.",
U64_PRINTF_ARG(mem_recovered),
- n_circuits_killed);
+ n_circuits_killed,
+ smartlist_len(circlist) - n_circuits_killed);
smartlist_free(circlist);
}