From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla@dpdk.org Subject: [Bug 117] in case of malloc_elem_alloc should we increment alloc_count (heap->alloc_count++)? Date: Wed, 05 Dec 2018 05:27:29 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable To: dev@dpdk.org Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D117 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 =3D find_suitable_element(heap, size, flags, align, bound, con= tig); if (elem !=3D NULL) { elem =3D malloc_elem_alloc(elem, size, align, bound, contig= ); /* increase heap's count of allocated elements */ heap->alloc_count++; } return elem =3D=3D NULL ? NULL : (void *)(&elem[1]); is this expected behavior to update counter even if it fails? --=20 You are receiving this mail because: You are the assignee for the bug.=