From: Vipin Varghese <vipin.varghese@intel.com>
To: harry.van.haaren@intel.com, dev@dpdk.org
Cc: deepak.k.jain@intel.com, john.mcnamara@intel.com,
stable@dpdk.org, amol.patel@intel.com,
Vipin Varghese <vipin.varghese@intel.com>
Subject: [dpdk-dev] [PATCH] app/procinfo: fix memory leak by rte_service_init
Date: Wed, 24 Jan 2018 13:17:54 +0530 [thread overview]
Message-ID: <1516780074-4418-1-git-send-email-vipin.varghese@intel.com> (raw)
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
reply other threads:[~2018-01-24 13:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516780074-4418-1-git-send-email-vipin.varghese@intel.com \
--to=vipin.varghese@intel.com \
--cc=amol.patel@intel.com \
--cc=deepak.k.jain@intel.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=john.mcnamara@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).