malloc: deprecate unused set limit
PATCH 1/1 malloc: deprecate unused set limit
The function rte_malloc_set_limit was defined but never implemented. Mark it as deprecated for now, and remove in next release.
There is no point in keeping dead code.
"You Aren't Going to Need It"
--- app/test/test_malloc.c | 21 --------------------- doc/guides/rel_notes/release_19_08.rst | 3 +++ lib/librte_eal/common/include/rte_malloc.h | 2 +- 3 files changed, 4 insertions(+), 22 deletions(-)
app/test/test_malloc.c +0 -21
@@ -372,18 +372,6 @@ test_multi_alloc_statistics(void)return 0 ; } -static int -test_rte_malloc_type_limits (void ) -{ -/* The type-limits functionality is not yet implemented, -* so always return 0 no matter what the retval. -*/ -const char *typename ="limit_test" ; -rte_malloc_set_limit (typename,64 *1024 ); -rte_malloc_dump_stats (stdout, typename); -return 0 ; -} -static int test_realloc (void ) {
@@ -952,15 +940,6 @@ test_malloc(void) }else printf ("test_random_alloc_free() passed\n" ); -/*----------------------------*/ - ret =test_rte_malloc_type_limits (); -if (ret <0 ){ -printf ("test_rte_malloc_type_limits() failed\n" ); -return ret; - } -/* TODO: uncomment following line once type limits are valid */ -/*else printf("test_rte_malloc_type_limits() passed\n");*/ -/*----------------------------*/ ret =test_rte_malloc_validate ();if (ret <0 ){
doc/guides/rel_notes/release_19_08.rst +3 -0
@@ -135,6 +135,9 @@ API Changes * The network structures, definitions and functions have been prefixed by ``rte_`` to resolve conflicts with libc headers. +* malloc: The function ``rte_malloc_set_limit`` was never implemented + is deprecated and will be removed in a future release. + ABI Changes -----------
lib/librte_eal/common/include/rte_malloc.h +1 -1
@@ -526,7 +526,7 @@ rte_malloc_dump_heaps(FILE *f);* - 0: Success. * - (-1): Error. */ -int +int __rte_deprecatedrte_malloc_set_limit (const char *type,size_t max);/**
Signature · 1 line
2.20.1
Quoted 8 lines · Stephen Hemminger
The function
rte_malloc_set_limitwas defined but never implemented. Mark it as deprecated for now, and remove in next release.There is no point in keeping dead code.
"You Aren't Going to Need It"Signed-off-by Stephen Hemminger <[email protected]>---
Signature · 2 lines
Thanks, Anatoly
Thomas Monjalon
Applied27/06/2019 00:32, Stephen Hemminger:
lib/librte_eal/common/include/rte_malloc.h rte_malloc_dump_heaps(FILE *f); · line 530
Quoted 11 lines
The function
rte_malloc_set_limitwas defined but never implemented. Mark it as deprecated for now, and remove in next release.There is no point in keeping dead code.
"You Aren't Going to Need It"Signed-off-by Stephen Hemminger <[email protected]>---
lib/librte_eal/common/include/rte_malloc.h +1
-1-int +int __rte_deprecatedrte_malloc_set_limit (const char *type,size_t max);
Tag moved in a separate line before the return type.
Applied, thanks