pool.h (275B)
1 #ifndef __POOL_H 2 #define __POOL_H 3 4 #include <inttypes.h> 5 6 typedef int item_id; 7 8 struct pool *init_pool(void); 9 void free_pool(struct pool *pool); 10 void *alloc_item(struct pool *pool, size_t n, item_id id); 11 void free_items(struct pool *pool, item_id id); 12 13 #endif /* __POOL_H */