Mans Rullgard <m...@mansr.com> wrote:
> Also check for the aligned_alloc() function and alias to Microsoft's
> _aligned_malloc() if necessary.

How much does aligned_alloc help performance for you (and with which
settings)?  I'm on an older system with only memalign and
posix_memalign, and trying to enable it didn't change performance with
"--multi-thread --buffer=131072" on a 4-core AMD Phenom II X4 945

--- a/src/util.h
+++ b/src/util.h
@@ -194,8 +194,13 @@
 #define LSX_ALIGN(n)
 #endif
 
+#define HAVE_MEMALIGN
+
 #ifdef HAVE_ALIGNED_ALLOC
   #define aligned_free(p) free(p)
+#elif defined(HAVE_MEMALIGN)
+  #define aligned_alloc(a, s) memalign(a, s)
+  #define aligned_free(p) free(p)
 #elif defined _MSC_VER
   #define aligned_alloc(a, s) _aligned_malloc(s, a)
   #define aligned_free(p) _aligned_free(p)

------------------------------------------------------------------------------
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

Reply via email to