> -----Original Message----- > Subject: [PATCH v6 17/17] eal: add function attributes for allocation > functions > > 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. > > Newer 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(). > The name of the DPDK wrapper macros for these attributes are chosen to be > similar to what GLIBC is using in cdefs.h. > Note: The rte_free function prototype was moved ahead of the allocation > functions since the dealloc attribute now refers to it. > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> > Acked-by: Chengwen Feng <fengcheng...@huawei.com> > Acked-by: Anatoly Burakov <anatoly.bura...@intel.com> Acked-by: Wathsala Vithanage <wathsala.vithan...@arm.com>
RE: [PATCH v6 17/17] eal: add function attributes for allocation functions
Wathsala Wathawana Vithanage Wed, 02 Oct 2024 09:45:53 -0700
- [PATCH v6 08/17] net/e1000: fix use-afte... Stephen Hemminger
- [PATCH v6 09/17] net/sfc: fix use-after-... Stephen Hemminger
- [PATCH v6 10/17] net/cpfl: fix free of n... Stephen Hemminger
- [PATCH v6 11/17] net/nfp: fix duplicate ... Stephen Hemminger
- [PATCH v6 12/17] raw/ifpga/base: fix use... Stephen Hemminger
- [PATCH v6 13/17] common/qat: fix use aft... Stephen Hemminger
- [PATCH v6 14/17] drivers/ifpga: fix free... Stephen Hemminger
- [PATCH v6 15/17] baseband/la12xx: preven... Stephen Hemminger
- [PATCH v6 16/17] common/idpf: fix use af... Stephen Hemminger
- [PATCH v6 17/17] eal: add function attri... Stephen Hemminger
- RE: [PATCH v6 17/17] eal: add functi... Wathsala Wathawana Vithanage
- Re: [PATCH v6 17/17] eal: add fu... Ajit Khaparde
- RE: [PATCH v6 17/17] eal: add functi... Morten Brørup
- [PATCH v7 00/16] Fix allocation bugs and prev... Stephen Hemminger
- [PATCH v7 01/16] memzone: fix use after ... Stephen Hemminger
- [PATCH v7 02/16] cryptodev/bcmfs: fix mi... Stephen Hemminger
- [PATCH v7 03/16] dma/ixd: fix incorrect ... Stephen Hemminger
- [PATCH v7 04/16] event/cnxk: fix pointer... Stephen Hemminger
- RE: [EXTERNAL] [PATCH v7 04/16] even... Pavan Nikhilesh Bhagavatula
- [PATCH v7 05/16] examples/vhost: fix fre... Stephen Hemminger
- [PATCH v7 06/16] net/cnxk: fix use-after... Stephen Hemminger