Loading src/common/compat_libevent.c +0 −1 Original line number Diff line number Diff line Loading @@ -626,7 +626,6 @@ tor_add_bufferevent_to_rate_limit_group(struct bufferevent *bev, } #endif #if defined(LIBEVENT_VERSION_NUMBER) && LIBEVENT_VERSION_NUMBER >= V(2,1,1) \ && !defined(TOR_UNIT_TESTS) void Loading src/or/buffers.c +6 −3 Original line number Diff line number Diff line Loading @@ -235,7 +235,8 @@ chunk_free_unchecked(chunk_t *chunk) #ifdef DEBUG_CHUNK_ALLOC tor_assert(CHUNK_ALLOC_SIZE(chunk->memlen) == chunk->DBG_alloc); #endif tor_assert(total_bytes_allocated_in_chunks >= CHUNK_ALLOC_SIZE(chunk->memlen)); tor_assert(total_bytes_allocated_in_chunks >= CHUNK_ALLOC_SIZE(chunk->memlen)); total_bytes_allocated_in_chunks -= CHUNK_ALLOC_SIZE(chunk->memlen); tor_free(chunk); } Loading Loading @@ -272,7 +273,8 @@ chunk_grow(chunk_t *chunk, size_t sz) tor_assert(chunk->DBG_alloc == CHUNK_ALLOC_SIZE(memlen_orig)); chunk->DBG_alloc = CHUNK_ALLOC_SIZE(sz); #endif total_bytes_allocated_in_chunks += CHUNK_ALLOC_SIZE(sz) - CHUNK_ALLOC_SIZE(memlen_orig); total_bytes_allocated_in_chunks += CHUNK_ALLOC_SIZE(sz) - CHUNK_ALLOC_SIZE(memlen_orig); return chunk; } Loading Loading @@ -339,7 +341,8 @@ buf_shrink_freelists(int free_all) #ifdef DEBUG_CHUNK_ALLOC tor_assert(chunk->DBG_alloc == CHUNK_ALLOC_SIZE(chunk->memlen)); #endif tor_assert(total_bytes_allocated_in_chunks >= CHUNK_ALLOC_SIZE(chunk->memlen)); tor_assert(total_bytes_allocated_in_chunks >= CHUNK_ALLOC_SIZE(chunk->memlen)); total_bytes_allocated_in_chunks -= CHUNK_ALLOC_SIZE(chunk->memlen); total_freed += CHUNK_ALLOC_SIZE(chunk->memlen); tor_free(chunk); Loading src/test/test_buffers.c +0 −1 Original line number Diff line number Diff line Loading @@ -492,7 +492,6 @@ test_buffer_allocation_tracking(void *arg) tt_int_op(buf_allocation(buf2), ==, 8192); /* another 4k chunk. */ tt_int_op(buf_get_total_allocation(), ==, 5*4096); /* that chunk was new. */ /* Make a really huge buffer */ for (i = 0; i < 1000; ++i) { write_to_buf(junk, 4000, buf2); Loading Loading
src/common/compat_libevent.c +0 −1 Original line number Diff line number Diff line Loading @@ -626,7 +626,6 @@ tor_add_bufferevent_to_rate_limit_group(struct bufferevent *bev, } #endif #if defined(LIBEVENT_VERSION_NUMBER) && LIBEVENT_VERSION_NUMBER >= V(2,1,1) \ && !defined(TOR_UNIT_TESTS) void Loading
src/or/buffers.c +6 −3 Original line number Diff line number Diff line Loading @@ -235,7 +235,8 @@ chunk_free_unchecked(chunk_t *chunk) #ifdef DEBUG_CHUNK_ALLOC tor_assert(CHUNK_ALLOC_SIZE(chunk->memlen) == chunk->DBG_alloc); #endif tor_assert(total_bytes_allocated_in_chunks >= CHUNK_ALLOC_SIZE(chunk->memlen)); tor_assert(total_bytes_allocated_in_chunks >= CHUNK_ALLOC_SIZE(chunk->memlen)); total_bytes_allocated_in_chunks -= CHUNK_ALLOC_SIZE(chunk->memlen); tor_free(chunk); } Loading Loading @@ -272,7 +273,8 @@ chunk_grow(chunk_t *chunk, size_t sz) tor_assert(chunk->DBG_alloc == CHUNK_ALLOC_SIZE(memlen_orig)); chunk->DBG_alloc = CHUNK_ALLOC_SIZE(sz); #endif total_bytes_allocated_in_chunks += CHUNK_ALLOC_SIZE(sz) - CHUNK_ALLOC_SIZE(memlen_orig); total_bytes_allocated_in_chunks += CHUNK_ALLOC_SIZE(sz) - CHUNK_ALLOC_SIZE(memlen_orig); return chunk; } Loading Loading @@ -339,7 +341,8 @@ buf_shrink_freelists(int free_all) #ifdef DEBUG_CHUNK_ALLOC tor_assert(chunk->DBG_alloc == CHUNK_ALLOC_SIZE(chunk->memlen)); #endif tor_assert(total_bytes_allocated_in_chunks >= CHUNK_ALLOC_SIZE(chunk->memlen)); tor_assert(total_bytes_allocated_in_chunks >= CHUNK_ALLOC_SIZE(chunk->memlen)); total_bytes_allocated_in_chunks -= CHUNK_ALLOC_SIZE(chunk->memlen); total_freed += CHUNK_ALLOC_SIZE(chunk->memlen); tor_free(chunk); Loading
src/test/test_buffers.c +0 −1 Original line number Diff line number Diff line Loading @@ -492,7 +492,6 @@ test_buffer_allocation_tracking(void *arg) tt_int_op(buf_allocation(buf2), ==, 8192); /* another 4k chunk. */ tt_int_op(buf_get_total_allocation(), ==, 5*4096); /* that chunk was new. */ /* Make a really huge buffer */ for (i = 0; i < 1000; ++i) { write_to_buf(junk, 4000, buf2); Loading