From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1F16645A66; Mon, 30 Sep 2024 11:19:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D01E40299; Mon, 30 Sep 2024 11:19:13 +0200 (CEST) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id E97CC4027D for ; Mon, 30 Sep 2024 11:19:10 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4XHFqC0R18z2QTxb; Mon, 30 Sep 2024 17:18:15 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 90F64140360; Mon, 30 Sep 2024 17:19:08 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 30 Sep 2024 17:19:08 +0800 Message-ID: <23e57f2f-c521-4693-ba55-c1a2100dcc8c@huawei.com> Date: Mon, 30 Sep 2024 17:19:08 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 17/18] eal: add function attributes for allocation functions To: Stephen Hemminger , CC: Tyler Retzlaff , Anatoly Burakov References: <20240927204742.546164-1-stephen@networkplumber.org> <20240929154107.62539-1-stephen@networkplumber.org> <20240929154107.62539-18-stephen@networkplumber.org> Content-Language: en-US From: fengchengwen In-Reply-To: <20240929154107.62539-18-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Chengwen Feng On 2024/9/29 23:34, Stephen Hemminger wrote: > The allocation functions take a alignment argument that > can be useful to hint the compiler optimizer. > > This is supported by Gcc and Clang but only useful with > Gcc because Clang gives warning if alignment is 0. > > Recent versions of GCC have a malloc attribute that can > be used to find mismatches between allocation and free; > the typical problem caught is a pointer allocated with > rte_malloc() that is then incorrectly freed using free(). > > Signed-off-by: Stephen Hemminger