return (ptr >= pool->map) && (ptr < pool->map + pool_size);
}
+static inline unsigned int size_to_blocks(unsigned int size)
+{
+ return (size + SMALLOC_BPB - 1) / SMALLOC_BPB;
+}
+
static int blocks_iter(unsigned int *map, unsigned int idx,
unsigned int nr_blocks,
int (*func)(unsigned int *map, unsigned int mask))
sfree_pool(pool, ptr);
}
-static inline unsigned int size_to_blocks(unsigned int size)
-{
- return (size + SMALLOC_BPB - 1) / SMALLOC_BPB;
-}
-
static void *__smalloc_pool(struct pool *pool, unsigned int size)
{
unsigned int nr_blocks;