[dpdk-dev] [Bug 117] in case of malloc_elem_alloc should we increment alloc_count (heap->alloc_count++)?
bugzilla at dpdk.org
bugzilla at dpdk.org
Wed Dec 5 06:27:29 CET 2018
https://bugs.dpdk.org/show_bug.cgi?id=117
Bug ID: 117
Summary: in case of malloc_elem_alloc should we increment
alloc_count (heap->alloc_count++)?
Product: DPDK
Version: 18.11
Hardware: All
OS: All
Status: CONFIRMED
Severity: normal
Priority: Normal
Component: core
Assignee: dev at dpdk.org
Reporter: vipin.varghese at intel.com
Target Milestone: ---
file: lib/librte_eal/common/malloc_heap.c
function: heap_alloc
code snippet:
elem = find_suitable_element(heap, size, flags, align, bound, contig);
if (elem != NULL) {
elem = malloc_elem_alloc(elem, size, align, bound, contig);
/* increase heap's count of allocated elements */
heap->alloc_count++;
}
return elem == NULL ? NULL : (void *)(&elem[1]);
is this expected behavior to update counter even if it fails?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the dev
mailing list