[PATCH v3 1/2] rte_malloc: document that type is for tracing
Stephen Hemminger
stephen at networkplumber.org
Tue Jun 18 16:44:15 CEST 2024
The string type is only used for tracing and not used as
documented by dump_stats.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
lib/eal/include/rte_malloc.h | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/lib/eal/include/rte_malloc.h b/lib/eal/include/rte_malloc.h
index 54a8ac211e..1f91e7bdde 100644
--- a/lib/eal/include/rte_malloc.h
+++ b/lib/eal/include/rte_malloc.h
@@ -37,8 +37,8 @@ struct rte_malloc_socket_stats {
* NUMA socket as the core that calls this function.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * A string identifying the type of allocated objects (useful for tracing).
+ * Can be NULL.
* @param size
* Size (in bytes) to be allocated.
* @param align
@@ -64,8 +64,8 @@ rte_malloc(const char *type, size_t size, unsigned align)
* same NUMA socket as the core that calls this function.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * A string identifying the type of allocated objects (useful for tracing).
+ * Can be NULL.
* @param size
* Size (in bytes) to be allocated.
* @param align
@@ -89,8 +89,8 @@ rte_zmalloc(const char *type, size_t size, unsigned align)
* same NUMA socket as the core that calls this function.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * A string identifying the type of allocated objects (useful for tracing).
+ * Can be NULL.
* @param num
* Number of elements to be allocated.
* @param size
@@ -165,8 +165,8 @@ rte_realloc_socket(void *ptr, size_t size, unsigned int align, int socket)
* is not cleared.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * A string identifying the type of allocated objects (useful for tracing).
+ * Can be NULL.
* @param size
* Size (in bytes) to be allocated.
* @param align
@@ -194,8 +194,8 @@ rte_malloc_socket(const char *type, size_t size, unsigned align, int socket)
* initialised with zeros.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * A string identifying the type of allocated objects (useful for tracing).
+ * Can be NULL.
* @param size
* Size (in bytes) to be allocated.
* @param align
@@ -221,8 +221,8 @@ rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket)
* initialised with zeros.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * A string identifying the type of allocated objects (useful for tracing).
+ * Can be NULL.
* @param num
* Number of elements to be allocated.
* @param size
@@ -502,8 +502,7 @@ rte_malloc_heap_socket_is_external(int socket_id);
* @param f
* A pointer to a file for output
* @param type
- * A string identifying the type of objects to dump, or NULL
- * to dump all objects.
+ * Deprecated parameter unused.
*/
void
rte_malloc_dump_stats(FILE *f, const char *type);
--
2.43.0
More information about the dev
mailing list