DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 117] in case of malloc_elem_alloc should we increment alloc_count (heap->alloc_count++)?
@ 2018-12-05  5:27 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2018-12-05  5:27 UTC (permalink / raw)
  To: dev

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@dpdk.org
          Reporter: vipin.varghese@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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-05  5:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05  5:27 [dpdk-dev] [Bug 117] in case of malloc_elem_alloc should we increment alloc_count (heap->alloc_count++)? bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).