https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92143
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We increase the alignment when calling posix_memalign, so that shouldn't be the
problem:
static inline void*
aligned_alloc (std::size_t al, std::size_t sz)
{
void *ptr;
// posix_memalign has additional requirement, not present on aligned_alloc:
// The value of alignment shall be a power of two multiple of sizeof(void *).
if (al < sizeof(void*))
al = sizeof(void*);
int ret = posix_memalign (&ptr, al, sz);
if (ret == 0)
return ptr;
return nullptr;
}