Skip to content

Commit

Permalink
Less constrictive alignment test switch to malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbinks committed Aug 21, 2020
1 parent 2980213 commit 2b020b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/TaskScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_ );
Expand Down

0 comments on commit 2b020b2

Please sign in to comment.