aboutsummaryrefslogtreecommitdiff
path: root/src/or/buffers.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-11-20 11:56:35 -0500
committerNick Mathewson <nickm@torproject.org>2013-11-20 11:57:45 -0500
commiteabcab2b7caab75ba8607c7dac225e4533998e80 (patch)
tree9c41b29130260e1b8aaf57f966c1f9f4b0891118 /src/or/buffers.c
parent91ec6f7269bd7a5b73629f38e9779e84a0fb84f2 (diff)
downloadtor-eabcab2b7caab75ba8607c7dac225e4533998e80.tar
tor-eabcab2b7caab75ba8607c7dac225e4533998e80.tar.gz
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.
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r--src/or/buffers.c2
1 files changed, 1 insertions, 1 deletions
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;
}