numam-dpdk/lib/eal
David Marchand 2ca92f5441 malloc: fix size annotation for NUMA-aware realloc
__rte_alloc_size is mapped to compiler alloc_size attribute.

Quoting gcc documentation:
"""
alloc_size
    The alloc_size attribute is used to tell the compiler that the
    function return value points to memory, where the size is given by
    one or two of the functions parameters. GCC uses this information
    to improve the correctness of __builtin_object_size.

    The function parameter(s) denoting the allocated size are specified
    by one or two integer arguments supplied to the attribute.
    The allocated size is either the value of the single function
    argument specified or the product of the two function arguments
    specified. Argument numbering starts at one.
"""

In rte_realloc_socket case, only 'size' matters.

Note: this has been spotted by Maxime trying to use rte_realloc_socket
and compiling with gcc 11.

Fixes: 17b347dab7 ("malloc: add alloc_size attribute to functions")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2021-06-11 11:03:38 +02:00
..
arm eal/arm64: fix platform register bit 2021-05-04 18:55:09 +02:00
common ipc: use monotonic clock 2021-05-12 16:49:08 +02:00
freebsd eal: add timespec_get shim 2021-04-21 23:32:13 +02:00
include malloc: fix size annotation for NUMA-aware realloc 2021-06-11 11:03:38 +02:00
linux lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ppc lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
unix eal: fix memory mapping on 32-bit target 2021-05-11 23:01:06 +02:00
windows net/ice: fix leak on thread termination 2021-05-11 23:40:22 +02:00
x86 lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
meson.build lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
version.map lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00