/** @todo try this out. */ #ifdef WIN32 #include /** NOTE: errno is set with this one. */ #define malloc_aligned _aligned_malloc #else #include /** NOTE: errno is not set with this one. */ inline void *malloc_aligned(size_t size, size_t alignment) { void *ret; return posix_memalign(&ret, alignment, size) ? NULL : ret; } #endif