On OOM, also log N circuits remaining

This commit is contained in:
Nick Mathewson 2014-02-12 13:09:02 -05:00
parent fd28754dd3
commit 79c234e0e3

View File

@ -1589,9 +1589,11 @@ circuits_handle_oom(size_t current_allocation)
buf_shrink_freelists(1); /* This is necessary to actually release buffer buf_shrink_freelists(1); /* This is necessary to actually release buffer
chunks. */ 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), U64_PRINTF_ARG(mem_recovered),
n_circuits_killed); n_circuits_killed,
smartlist_len(circlist) - n_circuits_killed);
smartlist_free(circlist); smartlist_free(circlist);
} }