[dpdk-dev] [PATCH] app/pdump: fix the memory leak by rte_service_init

Vipin Varghese vipin.varghese at intel.com
Wed Jan 24 08:54:51 CET 2018


When pdump is run multiple times against any primary application,
it consumes huge page memory by rte_service_init. This is not freed
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/pdump/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 0f70c75..9d03366 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -25,6 +25,7 @@
 #include <rte_mempool.h>
 #include <rte_ring.h>
 #include <rte_pdump.h>
+#include <rte_service.h>
 
 #define CMD_LINE_OPT_PDUMP "pdump"
 #define PDUMP_PORT_ARG "port"
@@ -882,5 +883,7 @@ struct parse_val {
 	/* dump debug stats */
 	print_pdump_stats();
 
+	rte_service_finalize();
+
 	return 0;
 }
-- 
1.9.1



More information about the dev mailing list