diff options
Diffstat (limited to 'mem-pool.h')
-rw-r--r-- | mem-pool.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mem-pool.h b/mem-pool.h index 829ad58ecf..f75b3365d5 100644 --- a/mem-pool.h +++ b/mem-pool.h @@ -22,6 +22,16 @@ struct mem_pool { }; /* + * Initialize mem_pool with specified initial size. + */ +void mem_pool_init(struct mem_pool **mem_pool, size_t initial_size); + +/* + * Discard a memory pool and free all the memory it is responsible for. + */ +void mem_pool_discard(struct mem_pool *mem_pool); + +/* * Alloc memory from the mem_pool. */ void *mem_pool_alloc(struct mem_pool *pool, size_t len); |