git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
xen: fix build
[dpdk.git]
/
lib
/
librte_eal
/
common
/
malloc_elem.h
diff --git
a/lib/librte_eal/common/malloc_elem.h
b/lib/librte_eal/common/malloc_elem.h
index
9790b1a
..
f04b2d1
100644
(file)
--- a/
lib/librte_eal/common/malloc_elem.h
+++ b/
lib/librte_eal/common/malloc_elem.h
@@
-47,9
+47,9
@@
enum elem_state {
struct malloc_elem {
struct malloc_heap *heap;
struct malloc_elem {
struct malloc_heap *heap;
- struct malloc_elem *volatile prev; /* points to prev elem in mem
zone
*/
+ struct malloc_elem *volatile prev; /* points to prev elem in mem
seg
*/
LIST_ENTRY(malloc_elem) free_list; /* list of free elements in heap */
LIST_ENTRY(malloc_elem) free_list; /* list of free elements in heap */
- const struct rte_mem
zone *mz
;
+ const struct rte_mem
seg *ms
;
volatile enum elem_state state;
uint32_t pad;
size_t size;
volatile enum elem_state state;
uint32_t pad;
size_t size;
@@
-104,9
+104,9
@@
set_trailer(struct malloc_elem *elem)
static inline int
malloc_elem_cookies_ok(const struct malloc_elem *elem)
{
static inline int
malloc_elem_cookies_ok(const struct malloc_elem *elem)
{
- return
(
elem != NULL &&
+ return elem != NULL &&
MALLOC_ELEM_HEADER(elem) == MALLOC_HEADER_COOKIE &&
MALLOC_ELEM_HEADER(elem) == MALLOC_HEADER_COOKIE &&
- MALLOC_ELEM_TRAILER(elem) == MALLOC_TRAILER_COOKIE
)
;
+ MALLOC_ELEM_TRAILER(elem) == MALLOC_TRAILER_COOKIE;
}
#endif
}
#endif
@@
-136,11
+136,11
@@
malloc_elem_from_data(const void *data)
void
malloc_elem_init(struct malloc_elem *elem,
struct malloc_heap *heap,
void
malloc_elem_init(struct malloc_elem *elem,
struct malloc_heap *heap,
- const struct rte_mem
zone *mz
,
+ const struct rte_mem
seg *ms
,
size_t size);
/*
size_t size);
/*
- * initialise a dummy malloc_elem header for the end-of-mem
zone
marker
+ * initialise a dummy malloc_elem header for the end-of-mem
seg
marker
*/
void
malloc_elem_mkend(struct malloc_elem *elem,
*/
void
malloc_elem_mkend(struct malloc_elem *elem,
@@
-151,14
+151,16
@@
malloc_elem_mkend(struct malloc_elem *elem,
* of the requested size and with the requested alignment
*/
int
* of the requested size and with the requested alignment
*/
int
-malloc_elem_can_hold(struct malloc_elem *elem, size_t size, unsigned align);
+malloc_elem_can_hold(struct malloc_elem *elem, size_t size,
+ unsigned align, size_t bound);
/*
* reserve a block of data in an existing malloc_elem. If the malloc_elem
* is much larger than the data block requested, we split the element in two.
*/
struct malloc_elem *
/*
* reserve a block of data in an existing malloc_elem. If the malloc_elem
* is much larger than the data block requested, we split the element in two.
*/
struct malloc_elem *
-malloc_elem_alloc(struct malloc_elem *elem, size_t size, unsigned align);
+malloc_elem_alloc(struct malloc_elem *elem, size_t size,
+ unsigned align, size_t bound);
/*
* free a malloc_elem block by adding it to the free list. If the
/*
* free a malloc_elem block by adding it to the free list. If the