[PATCH v3 17/18] eal: add function attributes for allocation functions
fengchengwen
fengchengwen at huawei.com
Mon Sep 30 11:19:08 CEST 2024
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
On 2024/9/29 23:34, Stephen Hemminger wrote:
> The allocation functions take a alignment argument that
> can be useful to hint the compiler optimizer.
>
> This is supported by Gcc and Clang but only useful with
> Gcc because Clang gives warning if alignment is 0.
>
> Recent versions of GCC have a malloc attribute that can
> be used to find mismatches between allocation and free;
> the typical problem caught is a pointer allocated with
> rte_malloc() that is then incorrectly freed using free().
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
More information about the dev
mailing list