mempool.h 418 B

1234567891011121314
  1. #ifndef MEMPOOL_H
  2. #define MEMPOOL_H
  3. #include <stddef.h>
  4. struct mempool;
  5. typedef struct mempool *mempoolptr;
  6. LIQ_PRIVATE void* mempool_create(mempoolptr *mptr, const unsigned int size, unsigned int capacity, void* (*malloc)(size_t), void (*free)(void*));
  7. LIQ_PRIVATE void* mempool_alloc(mempoolptr *mptr, const unsigned int size, const unsigned int capacity);
  8. LIQ_PRIVATE void mempool_destroy(mempoolptr m);
  9. #endif