* [dpdk-dev] [PATCH] app/procinfo: fix memory leak by rte_service_init
@ 2018-01-24 7:47 Vipin Varghese
0 siblings, 0 replies; only message in thread
From: Vipin Varghese @ 2018-01-24 7:47 UTC (permalink / raw)
To: harry.van.haaren, dev
Cc: deepak.k.jain, john.mcnamara, stable, amol.patel, Vipin Varghese
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@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 94d53f5..1884e06 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -29,6 +29,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
@@ -660,5 +661,7 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,
if (enable_metrics)
metrics_display(RTE_METRICS_GLOBAL);
+ rte_service_finalize();
+
return 0;
}
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-24 13:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 7:47 [dpdk-dev] [PATCH] app/procinfo: fix memory leak by rte_service_init Vipin Varghese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).