From: Anatoly Burakov Date: Fri, 22 Feb 2019 15:29:29 +0000 (+0000) Subject: malloc: fix documentation of realloc function X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=929a91e99c22c022342382779f3a06ddaabb2ff5;p=dpdk.git malloc: fix documentation of realloc function The documentation for rte_realloc claims that the resized area will always reside on the same NUMA node. This is not actually the case - while *resized* area will be on the same NUMA node, if resizing the area is not possible, then the memory will be reallocated using rte_malloc(), which can allocate memory on another NUMA node, depending on which lcore rte_realloc() was called from and which NUMA nodes have memory available. Fix the API doc to match the actual code of rte_realloc(). Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov --- diff --git a/lib/librte_eal/common/include/rte_malloc.h b/lib/librte_eal/common/include/rte_malloc.h index 5fbde4ed8b..5ff1a39a2e 100644 --- a/lib/librte_eal/common/include/rte_malloc.h +++ b/lib/librte_eal/common/include/rte_malloc.h @@ -111,7 +111,7 @@ rte_calloc(const char *type, size_t num, size_t size, unsigned align); /** * Replacement function for realloc(), using huge-page memory. Reserved area * memory is resized, preserving contents. In NUMA systems, the new area - * resides on the same NUMA socket as the old area. + * may not reside on the same NUMA node as the old one. * * @param ptr * Pointer to already allocated memory