Lines Matching defs:alloc_fn
185 int mempool_init_node(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn,
192 pool->alloc = alloc_fn;
224 * @alloc_fn: user-defined element-allocation function.
233 int mempool_init(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn,
236 return mempool_init_node(pool, min_nr, alloc_fn, free_fn,
246 * @alloc_fn: user-defined element-allocation function.
252 * functions. This function might sleep. Both the alloc_fn() and the free_fn()
258 mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
261 return mempool_create_node(min_nr, alloc_fn, free_fn, pool_data,
266 mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
276 if (mempool_init_node(pool, min_nr, alloc_fn, free_fn, pool_data,
372 * this function only sleeps if the alloc_fn() function sleeps or