size_t elt_size, int socket, unsigned int flags, size_t align,
size_t bound, bool contig)
{
size_t elt_size, int socket, unsigned int flags, size_t align,
size_t bound, bool contig)
{
req.alloc_req.elt_size = elt_size;
req.alloc_req.page_sz = pg_sz;
req.alloc_req.socket = socket;
req.alloc_req.elt_size = elt_size;
req.alloc_req.page_sz = pg_sz;
req.alloc_req.socket = socket;
rte_spinlock_lock(&(heap->lock));
align = align == 0 ? 1 : align;
/* for legacy mode, try once and with all flags */
rte_spinlock_lock(&(heap->lock));
align = align == 0 ? 1 : align;
/* for legacy mode, try once and with all flags */
ret = heap_alloc(heap, type, size, flags, align, bound, contig);
goto alloc_unlock;
}
ret = heap_alloc(heap, type, size, flags, align, bound, contig);
goto alloc_unlock;
}
struct rte_memseg_list *msl;
unsigned int i, n_segs, before_space, after_space;
int ret;
struct rte_memseg_list *msl;
unsigned int i, n_segs, before_space, after_space;
int ret;
/* ...of which we can't avail if we are in legacy mode, or if this is an
* externally allocated segment.
*/
/* ...of which we can't avail if we are in legacy mode, or if this is an
* externally allocated segment.
*/