[dpdk-stable] [PATCH 3/4] app/procinfo: fix memory leak by rte_service_init

Harry van Haaren harry.van.haaren at intel.com
Tue Feb 13 17:05:43 CET 2018


From: Vipin Varghese <vipin.varghese at intel.com>

When procinfo is run multiple times against primary application,
it consumes huge page memory by rte_service_init. Which is not
released at exit of application.

Invoking rte_service_finalize to free memory and prevent memory leak.

Signed-off-by: Vipin Varghese <vipin.varghese at intel.com>
---
 app/proc_info/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/proc_info/main.c b/app/proc_info/main.c
index 64fbbd0..cd30b3c 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -58,6 +58,7 @@
 #include <rte_branch_prediction.h>
 #include <rte_string_fns.h>
 #include <rte_metrics.h>
+#include <rte_service.h>
 
 /* Maximum long option length for option parsing. */
 #define MAX_LONG_OPT_SZ 64
@@ -689,5 +690,7 @@ main(int argc, char **argv)
 	if (enable_metrics)
 		metrics_display(RTE_METRICS_GLOBAL);
 
+	rte_service_finalize();
+
 	return 0;
 }
-- 
2.7.4



More information about the stable mailing list