Re: [PATCH v4 17/17] eal: add function attributes for allocation functions

2024-10-02 Thread Burakov, Anatoly
On 10/1/2024 5:25 PM, Stephen Hemminger wrote: On Tue, 1 Oct 2024 14:25:46 +0200 David Marchand wrote: On Tue, Oct 1, 2024 at 2:21 PM Burakov, Anatoly wrote: + +/** + * Frees the memory space pointed to by the provided pointer. + * + * This pointer must have been returned by a previous call

Re: [PATCH v4 17/17] eal: add function attributes for allocation functions

2024-10-01 Thread Stephen Hemminger
On Tue, 1 Oct 2024 14:25:46 +0200 David Marchand wrote: > On Tue, Oct 1, 2024 at 2:21 PM Burakov, Anatoly > wrote: > > > + > > > +/** > > > + * Frees the memory space pointed to by the provided pointer. > > > + * > > > + * This pointer must have been returned by a previous call to > > > + * rte_

Re: [PATCH v4 17/17] eal: add function attributes for allocation functions

2024-10-01 Thread David Marchand
On Tue, Oct 1, 2024 at 2:21 PM Burakov, Anatoly wrote: > > + > > +/** > > + * Frees the memory space pointed to by the provided pointer. > > + * > > + * This pointer must have been returned by a previous call to > > + * rte_malloc(), rte_zmalloc(), rte_calloc() or rte_realloc(). The > > behaviour

Re: [PATCH v4 17/17] eal: add function attributes for allocation functions

2024-10-01 Thread Burakov, Anatoly
On 9/30/2024 8:44 PM, 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 at

[PATCH v4 17/17] eal: add function attributes for allocation functions

2024-09-30 Thread Stephen Hemminger
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 betwe