diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/buffers.c | 2 | ||||
-rw-r--r-- | src/or/circuitlist.c | 8 | ||||
-rw-r--r-- | src/or/relay.c | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index c0a3534d8d..c2eb228d29 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -631,7 +631,7 @@ buf_add_chunk_with_capacity(buf_t *buf, size_t capacity, int capped) chunk = chunk_new_with_alloc_size(preferred_chunk_size(capacity)); } - tor_gettimeofday_cached(&now); + tor_gettimeofday_cached_monotonic(&now); chunk->inserted_time = (uint32_t)tv_to_msec(&now); if (buf->tail) { diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 3081035abb..959334e768 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); } diff --git a/src/or/relay.c b/src/or/relay.c index 01143f418d..857b7e9d30 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -2151,7 +2151,8 @@ cell_queue_append_packed_copy(cell_queue_t *queue, const cell_t *cell, { struct timeval now; packed_cell_t *copy = packed_cell_copy(cell, wide_circ_ids); - tor_gettimeofday_cached(&now); + tor_gettimeofday_cached_monotonic(&now); + copy->inserted_time = (uint32_t)tv_to_msec(&now); /* Remember the time when this cell was put in the queue. */ |