git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a0d465
)
malloc: set pad to 0 on free
author
Anatoly Burakov
<anatoly.burakov@intel.com>
Wed, 2 May 2018 15:38:15 +0000
(16:38 +0100)
committer
Thomas Monjalon
<thomas@monjalon.net>
Wed, 2 May 2018 16:35:19 +0000
(18:35 +0200)
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 <anatoly.burakov@intel.com>
lib/librte_eal/common/malloc_elem.c
patch
|
blob
|
history
diff --git
a/lib/librte_eal/common/malloc_elem.c
b/lib/librte_eal/common/malloc_elem.c
index
af81961
..
0a86d34
100644
(file)
--- 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--;