malloc: deprecate unused function to set limit
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 26 Jun 2019 22:32:12 +0000 (15:32 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 1 Jul 2019 16:37:50 +0000 (18:37 +0200)
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"

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
app/test/test_malloc.c
doc/guides/rel_notes/release_19_08.rst
lib/librte_eal/common/include/rte_malloc.h

index f0e608cdaf22aeba7571ef8d49eb8e101e43b5f5..7243e838947228546640e28a0bd8904da4ee976c 100644 (file)
@@ -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){
index 8e0b13e05136cbf85d63f97d002e97333b439d44..60c2581361321f0b3950870d7b17cea8cd869788 100644 (file)
@@ -162,6 +162,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
 -----------
index 3d4fad40eb32487dded393f5473105b9710e1e58..3593fb45c7e58595457a1a92c226219b09eb932a 100644 (file)
@@ -536,6 +536,7 @@ rte_malloc_dump_heaps(FILE *f);
  *   - 0: Success.
  *   - (-1): Error.
  */
+__rte_deprecated
 int
 rte_malloc_set_limit(const char *type, size_t max);