109 struct Buffer *buf = *ptr;
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
void buf_free(struct Buffer **ptr)
Deallocates a buffer.
struct Buffer * buf_new(const char *str)
Allocate a new Buffer.
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
General purpose object for storing and parsing strings.
#define mutt_debug(LEVEL,...)
@ LL_DEBUG1
Log at debug level 1.
void mutt_mem_realloc(void *ptr, size_t size)
Resize a block of memory on the heap.
Memory management wrappers.
static const size_t BufferPoolInitialBufferSize
Minimum size for a buffer.
static void pool_increase_size(void)
Increase the size of the Buffer pool.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
static const size_t BufferPoolIncrement
Amount to increase the size of the pool.
void buf_pool_cleanup(void)
Release the Buffer pool.
static size_t BufferPoolLen
Total size of the pool.
static size_t BufferPoolCount
Number of buffers in the pool.
static struct Buffer ** BufferPool
A pool of buffers.
A global pool of Buffers.
String manipulation buffer.
size_t dsize
Length of data.
char * data
Pointer to data.