Lines Matching full:elements
142 pool->elements[pool->curr_nr++] = element; in add_element()
147 void *element = pool->elements[--pool->curr_nr]; in remove_element()
160 * Free all reserved elements in @pool and @pool itself. This function
172 kfree(pool->elements); in mempool_exit()
173 pool->elements = NULL; in mempool_exit()
182 * Free all reserved elements in @pool and @pool itself. This function
206 pool->elements = kmalloc_array_node(min_nr, sizeof(void *), in mempool_init_node()
208 if (!pool->elements) in mempool_init_node()
232 * @min_nr: the minimum number of elements guaranteed to be
254 * @min_nr: the minimum number of elements guaranteed to be
294 * @new_min_nr: the new minimum number of elements guaranteed to be
343 memcpy(new_elements, pool->elements, in mempool_resize()
345 kfree(pool->elements); in mempool_resize()
346 pool->elements = new_elements; in mempool_resize()
454 * mempool_alloc_preallocated - allocate an element from preallocated elements
460 * an element from the preallocated elements. It does not sleep and immediately
461 * returns if no preallocated elements are available.
463 * Return: pointer to the allocated element or %NULL if no elements are
531 * to min_nr after the allocation of @element, the elements in mempool_free()
535 * ensures that there will be frees which return elements to the in mempool_free()