From: Anatoly Burakov Date: Wed, 2 May 2018 15:38:15 +0000 (+0100) Subject: malloc: set pad to 0 on free X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=dc14d4f026b734d42365de998103acb24a9edd0e;p=dpdk.git malloc: set pad to 0 on free The pad value is not used unless element is in pad state, but it will show up in heap dumps and may be confusing. Signed-off-by: Anatoly Burakov --- diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c index af81961d27..0a86d347a0 100644 --- a/lib/librte_eal/common/malloc_elem.c +++ b/lib/librte_eal/common/malloc_elem.c @@ -445,6 +445,8 @@ malloc_elem_free(struct malloc_elem *elem) malloc_elem_free_list_insert(elem); + elem->pad = 0; + /* decrease heap's count of allocated elements */ elem->heap->alloc_count--;