> From: Chengwen Feng [mailto:fengcheng...@huawei.com] > Sent: Saturday, 14 January 2023 12.50 > > The memarea library is an allocator of variable-size object which based > on a memory region. > > This patch provides rte_memarea_create() and rte_memarea_destroy() API. > > Signed-off-by: Chengwen Feng <fengcheng...@huawei.com> > Reviewed-by: Dongdong Liu <liudongdo...@huawei.com> > ---
[...] > +struct memarea_obj { > + TAILQ_ENTRY(memarea_obj) obj_node; > + TAILQ_ENTRY(memarea_obj) free_node; > + size_t size; > + size_t alloc_size; > + uint32_t magic; > +}; The magic cookie is for debug purposes only, and should be enclosed by #ifdef RTE_LIBRTE_MEMAREA_DEBUG, like in the mempool library [1]. [1]: https://elixir.bootlin.com/dpdk/latest/source/lib/mempool/rte_mempool.h#L154 With that added: Series-acked-by: Morten Brørup <m...@smartsharesystems.com>