From eabcab2b7caab75ba8607c7dac225e4533998e80 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 20 Nov 2013 11:56:35 -0500 Subject: Count freed buffer bytes from buffers when oom-killing circuits. Also, aggressively clear the buffers to try to make their bytes go away fast rather than waiting for the close-marked-connection code to get 'em. --- src/or/buffers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/or/buffers.c') diff --git a/src/or/buffers.c b/src/or/buffers.c index 4b176a83e..71b61b189 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -547,7 +547,7 @@ buf_allocation(const buf_t *buf) size_t total = 0; const chunk_t *chunk; for (chunk = buf->head; chunk; chunk = chunk->next) { - total += chunk->memlen; + total += CHUNK_ALLOC_SIZE(chunk->memlen); } return total; } -- cgit v1.2.3