#ifndef MEM_POOL_H
#define MEM_POOL_H
struct mp_block { … };
struct mem_pool { … };
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);
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);
__attribute__((format (printf, 2, 3)))
char *mem_pool_strfmt(struct mem_pool *pool, const char *fmt, ...);
void mem_pool_combine(struct mem_pool *dst, struct mem_pool *src);
int mem_pool_contains(struct mem_pool *pool, void *mem);
#endif