Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Jan 17, 2025
1 parent 4d1ac24 commit 8bc7434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Shared/Base/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ namespace Death {
// It seems like a strange requirement -- it could just overalign for lower alignment values instead of failing.
// Which is what we do here. The Windows _aligned_malloc() API doesn't have this requirement.
void* data = {};
int result = posix_memalign(&data, std::max(alignment, sizeof(void*)), size * sizeof(T));
int result = posix_memalign(&data, alignment < sizeof(void*) ? sizeof(void*) : alignment, size * sizeof(T));
DEATH_DEBUG_ASSERT(result == 0);
return Containers::Array<T>{static_cast<T*>(data), size, Implementation::alignedDeleter<T>};
#elif defined(DEATH_TARGET_WINDOWS)
Expand Down

0 comments on commit 8bc7434

Please sign in to comment.