2 * Sherlock Library -- Memory Pools
4 * (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
10 struct memchunk *chunks;
12 uns chunk_size, threshold;
15 struct mempool *new_pool(uns);
16 void free_pool(struct mempool *);
17 void *pool_alloc(struct mempool *, uns);
19 extern inline void *fast_alloc(struct mempool *p, uns l)
21 void *f = (void *) (((uns) p->free + POOL_ALIGN - 1) & ~(POOL_ALIGN - 1));
24 return pool_alloc(p, l);
29 extern inline void *fast_alloc_noalign(struct mempool *p, uns l)
34 return pool_alloc(p, l);