malloc: fix memory element size in case of padding
This patch fixes wrong inner memory element size when joining two
elements.
Fixes: af75078fec
("first public release")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit is contained in:
parent
694fd2cb8d
commit
2808a12cc0
@ -487,6 +487,10 @@ join_elem(struct malloc_elem *elem1, struct malloc_elem *elem2)
|
||||
else
|
||||
elem1->heap->last = elem1;
|
||||
elem1->next = next;
|
||||
if (elem1->pad) {
|
||||
struct malloc_elem *inner = RTE_PTR_ADD(elem1, elem1->pad);
|
||||
inner->size = elem1->size - elem1->pad;
|
||||
}
|
||||
}
|
||||
|
||||
struct malloc_elem *
|
||||
|
Loading…
Reference in New Issue
Block a user