#include "git-compat-util.h"
#include "mem-pool.h"
#include "gettext.h"
#define BLOCK_GROWTH_SIZE …
struct git_max_alignment { … };
#define GIT_MAX_ALIGNMENT …
static struct mp_block *mem_pool_alloc_block(struct mem_pool *pool,
size_t block_alloc,
struct mp_block *insert_after)
{ … }
void mem_pool_init(struct mem_pool *pool, size_t initial_size)
{ … }
void mem_pool_discard(struct mem_pool *pool, int invalidate_memory)
{ … }
void *mem_pool_alloc(struct mem_pool *pool, size_t len)
{ … }
static char *mem_pool_strvfmt(struct mem_pool *pool, const char *fmt,
va_list ap)
{ … }
char *mem_pool_strfmt(struct mem_pool *pool, const char *fmt, ...)
{ … }
void *mem_pool_calloc(struct mem_pool *pool, size_t count, size_t size)
{ … }
char *mem_pool_strdup(struct mem_pool *pool, const char *str)
{ … }
char *mem_pool_strndup(struct mem_pool *pool, const char *str, size_t len)
{ … }
int mem_pool_contains(struct mem_pool *pool, void *mem)
{ … }
void mem_pool_combine(struct mem_pool *dst, struct mem_pool *src)
{ … }