2016-11-20 00:38:15 +00:00
|
|
|
#ifndef MEMPOOL_H
|
|
|
|
#define MEMPOOL_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
struct mempool;
|
2018-12-31 03:35:00 +00:00
|
|
|
typedef struct mempool *mempoolptr;
|
2016-11-20 00:38:15 +00:00
|
|
|
|
2018-12-31 03:35:00 +00:00
|
|
|
LIQ_PRIVATE void* mempool_create(mempoolptr *mptr, const unsigned int size, unsigned int capacity, void* (*malloc)(size_t), void (*free)(void*));
|
|
|
|
LIQ_PRIVATE void* mempool_alloc(mempoolptr *mptr, const unsigned int size, const unsigned int capacity);
|
|
|
|
LIQ_PRIVATE void mempool_destroy(mempoolptr m);
|
2016-11-20 00:38:15 +00:00
|
|
|
|
|
|
|
#endif
|