From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 64ED28E88 for ; Tue, 10 May 2016 10:12:19 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 10 May 2016 01:12:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,604,1455004800"; d="scan'208";a="100362042" Received: from smonroyx-mobl.ger.corp.intel.com (HELO [10.237.220.58]) ([10.237.220.58]) by fmsmga004.fm.intel.com with ESMTP; 10 May 2016 01:12:17 -0700 From: Sergio Gonzalez Monroy To: Mahdi Moradmand Badie Cc: dev@dpdk.org References: Message-ID: <6cbfe6bd-b4c4-c0c8-3969-9d362193d8b3@intel.com> Date: Tue, 10 May 2016 09:12:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] rte_malloc 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, 10 May 2016 08:12:19 -0000 Hi, On 09/05/2016 18:32, Mahdi Moradmand Badie wrote: > Hello All, > > I had a problem regarding use the rte_malloc. > I want to know if I want to use rte_malloc instead of malloc just mak > change like this > struct lcore_params *p = malloc > > (sizeof(*p)); ==> > struct lcore_params *p = rte_malloc > (NULL, > sizeof(*p), 0); > is enough ? Yes, malloc(sizeof(*p)) has an equivalent behavior to rte_malloc(NULL, sizeof(*p), 0) in the context of a DPDK application. > Because I have problem and Segmentation fault (core dumped) ?? Could you provide more details of how to reproduce or could you try to reproduce your problem using a very simple example like examples/helloworld ? Sergio > Thanks in advance, > >