Listing 30 C interface for a generic memory pool manager

/* pool.h */
#include <stddef.h>

/* Incomplete type: */
typedef struct Pool Pool;

/* Pool management functions */
Pool *pool_create(size_t elem_size, size_t init_alloc, size_t extent);
void *pool_get_elem(Pool *p);
void pool_release_elem(Pool *p, void *elem);
void pool_free(Pool *p);
/* End of File */