void * syten::l_malloc | ( | std::size_t const | size, |
std::size_t const | alignment = 64 |
||
) |
Allocates a region of heap memory at least size
bytes large, aligned to alignment
boundary.
Uses posix_memalign()
, mkl_alloc()
was always slower when tested.
size | minimal number of bytes to allocate |
alignment | alignment requirement |
p
s.t. p % alignment == 0
and p[i]
is valid for all i > -1 ∧ i < size
References smallest_multiple().
Referenced by syten::Cuda::CudaAllocator::get_memory(), syten::DynArray< Type >::initNew(), and syten::DynArray< Type >::initTrivial().