2015-06-05 17:58:41 +00:00
|
|
|
#ifndef MEMPOOL_H
|
|
|
|
#define MEMPOOL_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
struct mempool;
|
|
|
|
typedef struct mempool *mempool;
|
|
|
|
|
2017-05-20 11:41:22 +00:00
|
|
|
LIQ_PRIVATE void* mempool_create(mempool *mptr, const unsigned int size, unsigned int capacity, void* (*malloc)(size_t), void (*free)(void*));
|
|
|
|
LIQ_PRIVATE void* mempool_alloc(mempool *mptr, const unsigned int size, const unsigned int capacity);
|
2015-06-05 17:58:41 +00:00
|
|
|
LIQ_PRIVATE void mempool_destroy(mempool m);
|
|
|
|
|
|
|
|
#endif
|