Skip to content

Commit

Permalink
Fix allocation of large aligned memory
Browse files Browse the repository at this point in the history
  • Loading branch information
rvaser committed Nov 3, 2020
1 parent 07d77bb commit a33d966
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simd_alignment_engine_implementation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ inline void* align(
template<Architecture A, typename T>
T* AllocateAlignedMemory(
T** storage,
std::uint32_t size,
std::uint32_t alignment) {
std::size_t size,
std::size_t alignment) {
*storage = new T[size + alignment - 1];
void* ptr = static_cast<void*>(*storage);
std::size_t storage_size = (size + alignment - 1) * sizeof(T);
Expand Down

0 comments on commit a33d966

Please sign in to comment.