1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017-2018 Intel Corporation
10 #include <rte_memory.h>
13 * Allocate segment of specified page size.
16 eal_memalloc_alloc_seg(size_t page_sz, int socket);
19 * Allocate `n_segs` segments.
21 * Note: `ms` can be NULL.
23 * Note: it is possible to request best-effort allocation by setting `exact` to
24 * `false`, in which case allocator will return however many pages it managed to
25 * allocate successfully.
28 eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz,
29 int socket, bool exact);
35 eal_memalloc_free_seg(struct rte_memseg *ms);
38 * Deallocate `n_segs` segments. Returns 0 on successful deallocation of all
39 * segments, returns -1 on error. Any segments that could have been deallocated,
40 * will be deallocated even in case of error.
43 eal_memalloc_free_seg_bulk(struct rte_memseg **ms, int n_segs);
45 #endif /* EAL_MEMALLOC_H */