diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-02-11 09:03:50 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-02-11 09:03:50 -0500 |
commit | 6f331645c75e88ec4f6dbabce5a2d3733894dd78 (patch) | |
tree | 71c5a03b004043c2b5c41fa353392be1e913d075 /src/or/buffers.h | |
parent | 0c81dfa848da160b02818771626a425cd27b86bc (diff) | |
download | tor-6f331645c75e88ec4f6dbabce5a2d3733894dd78.tar.gz tor-6f331645c75e88ec4f6dbabce5a2d3733894dd78.zip |
Remove mempools and buf freelists
They have been off-by-default since 0.2.5 and nobody has complained. :)
Also remove the buf_shrink() function, which hasn't done anything
since we first stopped using contiguous memory to store buffers.
Closes ticket 14848.
Diffstat (limited to 'src/or/buffers.h')
-rw-r--r-- | src/or/buffers.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/or/buffers.h b/src/or/buffers.h index 6dd3d1762b..6d0c68500b 100644 --- a/src/or/buffers.h +++ b/src/or/buffers.h @@ -20,9 +20,6 @@ size_t buf_get_default_chunk_size(const buf_t *buf); void buf_free(buf_t *buf); void buf_clear(buf_t *buf); buf_t *buf_copy(const buf_t *buf); -void buf_shrink(buf_t *buf); -size_t buf_shrink_freelists(int free_all); -void buf_dump_freelist_sizes(int severity); MOCK_DECL(size_t, buf_datalen, (const buf_t *buf)); size_t buf_allocation(const buf_t *buf); @@ -108,9 +105,9 @@ STATIC void buf_pullup(buf_t *buf, size_t bytes, int nulterminate); void buf_get_first_chunk_data(const buf_t *buf, const char **cp, size_t *sz); #define DEBUG_CHUNK_ALLOC -/** A single chunk on a buffer or in a freelist. */ +/** A single chunk on a buffer. */ typedef struct chunk_t { - struct chunk_t *next; /**< The next chunk on the buffer or freelist. */ + struct chunk_t *next; /**< The next chunk on the buffer. */ size_t datalen; /**< The number of bytes stored in this chunk */ size_t memlen; /**< The number of usable bytes of storage in <b>mem</b>. */ #ifdef DEBUG_CHUNK_ALLOC |