> From: Chengwen Feng [mailto:[email protected]]
> 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 <[email protected]>
> Reviewed-by: Dongdong Liu <[email protected]>
> ---
[...]
> +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 <[email protected]>