$ARCH_EXT_LIST
$HAVE_LIST_PUB
$THREADS_LIST
+ aligned_malloc
aligned_stack
alsa_asoundlib_h
altivec_h
check_func mkstemp
check_func mmap
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
+check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
check_func setrlimit
check_func strerror_r
check_func strptime
enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
-! enabled_any memalign posix_memalign &&
+! enabled_any memalign posix_memalign aligned_malloc &&
enabled_any $need_memalign && enable memalign_hack
echo "install prefix $prefix"
#elif HAVE_POSIX_MEMALIGN
if (posix_memalign(&ptr,32,size))
ptr = NULL;
+#elif HAVE_ALIGNED_MALLOC
+ ptr = _aligned_malloc(size, 32);
#elif HAVE_MEMALIGN
ptr = memalign(32,size);
/* Why 64?
if(!ptr) return av_malloc(size);
diff= ((char*)ptr)[-1];
return (char*)realloc((char*)ptr - diff, size + diff) + diff;
+#elif HAVE_ALIGNED_MALLOC
+ return _aligned_realloc(ptr, size, 32);
#else
return realloc(ptr, size);
#endif
#if CONFIG_MEMALIGN_HACK
if (ptr)
free((char*)ptr - ((char*)ptr)[-1]);
+#elif HAVE_ALIGNED_MALLOC
+ _aligned_free(ptr);
#else
free(ptr);
#endif