This problem had fix in this patch http://patches.dpdk.org/project/dpdk/patch/20230912090415.48709-1-changfeng...@bytedance.com/ I'm doing long-term test, especially rte_zmalloc.
Fengnan Chang <changfeng...@bytedance.com> 于2023年9月12日周二 10:44写道: > > This patch still have problem, I'll fix next version. > > Stephen Hemminger <step...@networkplumber.org> 于2023年9月6日周三 23:08写道: > > > > On Thu, 31 Aug 2023 19:19:37 +0800 > > Fengnan Chang <changfeng...@bytedance.com> wrote: > > > > > +#ifndef RTE_MALLOC_DEBUG > > > + if (internal_conf->legacy_mem) { > > > + /* If orig_elem is dirty, the joint element is clean, we > > > need do memset now */ > > > + if (elem->orig_elem->dirty && !elem->dirty) > > > + memset(ptr, 0, data_len); > > > + } else if (!elem->dirty) { > > > + memset(ptr, 0, data_len); > > > + } > > > +#else > > > + /* Always poison the memory in debug mode. */ > > > + memset(ptr, MALLOC_POISON, data_len); > > > +#endif > > > > The code reads better if positive clause was first. > > Got it, I'll do as you suggest in next version. > > I.e. > > > > #ifdef RTE_MALLOC_DEBUG > > /* Always poison the memory in debug mode. */ > > memset(ptr, MALLOC_POISON, data_len); > > #else > > ...