SyTen

◆ next_multiple()

template<typename T , typename U >
constexpr T syten::EternalMalloc::next_multiple ( T const  current,
U const  alignment 
)
constexpr

Casts current to the type of alignment and adds the difference to the next value at which U(current) % alignment is zero; i.e. if alignment is 64, it returns the smallest value greater than current which is divisible by 64.