Open
Description
libstdc++ seems to internally make use of the GNU memalign
function instead of the ISO C aligned_alloc
function.
namespace __gnu_cxx {
#if _GLIBCXX_HAVE_ALIGNED_ALLOC
using ::aligned_alloc;
[...]
#elif _GLIBCXX_HAVE_MEMALIGN
static inline void*
aligned_alloc (std::size_t al, std::size_t sz)
{
// Solaris requires al >= sizeof a word and QNX requires >= sizeof(void*)
// but they both provide posix_memalign, so will use the definition above.
return memalign (al, sz);
}
[...]
while ((p = __gnu_cxx::aligned_alloc (align, sz)) == nullptr)
Find out why _GLIBCXX_HAVE_ALIGNED_ALLOC
is not being defined and make sure it is defined and the non-standard memalign
function is not used by libstdc++.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status