diff --git a/src/TaskScheduler.cpp b/src/TaskScheduler.cpp index 5f91cbb2..88555141 100644 --- a/src/TaskScheduler.cpp +++ b/src/TaskScheduler.cpp @@ -167,8 +167,7 @@ ENKITS_API void* enki::DefaultAllocFunc( size_t align_, size_t size_, void* user pRet = (void*)_aligned_malloc( size_, align_ ); #else pRet = nullptr; - if( ( size_ == sizeof(uint32_t) && align_ == alignof(uint32_t) ) - || ( size_ == sizeof(intptr_t) && align_ == alignof(intptr_t) ) ) + if( align_ <= size_ && align_ <= alignof(int64_t) ) { // no need for alignment, use malloc pRet = malloc( size_ );