Re: [FFmpeg-devel] [PATCH] avutil/mem: use C11 aligned_malloc()

2024-02-18 Thread James Almer
On 2/18/2024 9:08 PM, Michael Niedermayer wrote: On Sun, Feb 18, 2024 at 01:16:36PM -0300, James Almer wrote: Save for the Microsoft C Runtime library, where free() can't handle aligned buffers, aligned_malloc() should be available and working on all supported targets. Also, malloc() alone may b

Re: [FFmpeg-devel] [PATCH] avutil/mem: use C11 aligned_malloc()

2024-02-18 Thread Michael Niedermayer
On Sun, Feb 18, 2024 at 01:16:36PM -0300, James Almer wrote: > Save for the Microsoft C Runtime library, where free() can't handle aligned > buffers, aligned_malloc() should be available and working on all supported > targets. > Also, malloc() alone may be sufficient if alignment requirement is low

Re: [FFmpeg-devel] [PATCH] avutil/mem: use C11 aligned_malloc()

2024-02-18 Thread Rémi Denis-Courmont
Le sunnuntaina 18. helmikuuta 2024, 18.29.32 EET James Almer a écrit : > Removing all the different target specific allocation functions in favor > of the standard one. But your second point makes it moot, so patch > withdrawn. If you want to get code closer to standards for dealing with alignment

Re: [FFmpeg-devel] [PATCH] avutil/mem: use C11 aligned_malloc()

2024-02-18 Thread Rémi Denis-Courmont
Le sunnuntaina 18. helmikuuta 2024, 18.16.36 EET James Almer a écrit : > Save for the Microsoft C Runtime library, where free() can't handle aligned > buffers, aligned_malloc() should be available and working on all supported > targets. > Also, malloc() alone may be sufficient if alignment requirem

Re: [FFmpeg-devel] [PATCH] avutil/mem: use C11 aligned_malloc()

2024-02-18 Thread Rémi Denis-Courmont
Le sunnuntaina 18. helmikuuta 2024, 18.27.35 EET Andreas Rheinhardt a écrit : > 1. The function is called aligned_alloc (how did you test this?). > 2. C11: "The value of alignment shall be a valid alignment supported by > the implementation and the value of size shall be an integral multiple > of a

Re: [FFmpeg-devel] [PATCH] avutil/mem: use C11 aligned_malloc()

2024-02-18 Thread James Almer
On 2/18/2024 1:27 PM, Andreas Rheinhardt wrote: James Almer: Save for the Microsoft C Runtime library, where free() can't handle aligned buffers, aligned_malloc() should be available and working on all supported targets. Also, malloc() alone may be sufficient if alignment requirement is low, so

Re: [FFmpeg-devel] [PATCH] avutil/mem: use C11 aligned_malloc()

2024-02-18 Thread Andreas Rheinhardt
James Almer: > Save for the Microsoft C Runtime library, where free() can't handle aligned > buffers, aligned_malloc() should be available and working on all supported > targets. > Also, malloc() alone may be sufficient if alignment requirement is low, so add > a check for it. > > Signed-off-by: J