From patchwork Wed Jan 24 07:54:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 34411 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2DF8E1B198; Wed, 24 Jan 2018 14:25:28 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 925F81B173; Wed, 24 Jan 2018 14:25:26 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 05:25:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,407,1511856000"; d="scan'208";a="12677741" Received: from unknown (HELO localhost.localdomain) ([10.224.122.203]) by fmsmga007.fm.intel.com with ESMTP; 24 Jan 2018 05:25:23 -0800 From: Vipin Varghese 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 Date: Wed, 24 Jan 2018 13:24:51 +0530 Message-Id: <1516780491-4554-1-git-send-email-vipin.varghese@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] app/pdump: fix the 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Harry van Haaren --- 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 #include #include +#include #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; }