From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6348A7CC4; Thu, 11 Jan 2018 20:48:08 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2018 11:48:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,346,1511856000"; d="scan'208";a="194149428" Received: from unknown (HELO localhost.localdomain) ([10.224.122.203]) by fmsmga005.fm.intel.com with ESMTP; 11 Jan 2018 11:48:05 -0800 From: Vipin Varghese To: harry.van.haaren@intel.com, dev@dpdk.org Cc: stable@dpdk.org, Vipin Varghese Date: Fri, 12 Jan 2018 01:17:34 +0530 Message-Id: <1515700054-29654-1-git-send-email-vipin.varghese@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1514735641-8738-1-git-send-email-vipin.varghese@intel.com> References: <1514735641-8738-1-git-send-email-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v2] app/procinfo: Fix memory leak by rte_service_init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2018 19:48:09 -0000 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 real memory and prevent memory leak. Signed-off-by: Vipin Varghese --- 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 #include #include +#include /* 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