From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 576B4593E for ; Tue, 19 Aug 2014 05:50:43 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 18 Aug 2014 20:54:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,891,1400050800"; d="scan'208";a="578535260" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 18 Aug 2014 20:53:27 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.19.9.28) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 18 Aug 2014 20:53:27 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX119.amr.corp.intel.com (10.19.9.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 18 Aug 2014 20:53:27 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.17]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.174]) with mapi id 14.03.0195.001; Tue, 19 Aug 2014 11:53:25 +0800 From: "Zhang, Helin" To: "zhang.zhangkun@huawei.com" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] there are some memory leak about Dir operator Thread-Index: AQHPu19eT+LS3/3k/0egaRKzhXJK8JvXSuqg Date: Tue, 19 Aug 2014 03:53:25 +0000 Message-ID: References: <1408419580-19684-1-git-send-email-zhang.zhangkun@huawei.com> In-Reply-To: <1408419580-19684-1-git-send-email-zhang.zhangkun@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: zhangkun Subject: Re: [dpdk-dev] [PATCH] there are some memory leak about Dir operator X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 03:50:43 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of > zhang.zhangkun@huawei.com > Sent: Tuesday, August 19, 2014 11:40 AM > To: dev@dpdk.org > Cc: zhangkun > Subject: [dpdk-dev] [PATCH] there are some memory leak about Dir operator >=20 > From: zhangkun >=20 >=20 > Signed-off-by: zhangkun > --- > lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c > b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c > index b72a205..d784b7c 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c > +++ b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c > @@ -311,12 +311,14 @@ eal_hugepage_info_init(void) > /* if blocking lock failed */ > if (flock(hpi->lock_descriptor, LOCK_EX) =3D=3D -1) { > RTE_LOG(CRIT, EAL, "Failed to lock hugepage > directory!\n"); > + closedir(dir); > return -1; > } > /* clear out the hugepages dir from unused pages */ > - if (clear_hugedir(hpi->hugedir) =3D=3D -1) > + if (clear_hugedir(hpi->hugedir) =3D=3D -1) { > + closedir(dir); > return -1; > - > + } > /* for now, put all pages into socket 0, > * later they will be sorted */ > hpi->num_pages[0] =3D > get_num_hugepages(dirent->d_name); > -- > 1.7.3.1.msysgit.0 >=20 Hi Zhangkun Could you help to explain more detailed about the memory leak? Wouldn't the= OS take care of those closing during process exiting? Regards, Helin