#include "pls/internal/base/alignment.h" namespace pls { namespace internal { namespace base { namespace alignment { system_details::pointer_t next_alignment(system_details::pointer_t size, size_t alignment) { return (size % alignment) == 0 ? size : size + (alignment - (size % alignment)); } system_details::pointer_t previous_alignment(system_details::pointer_t size, size_t alignment) { return (size % alignment) == 0 ? size : size - (size % alignment); } char *next_alignment(char *pointer, size_t alignment) { return reinterpret_cast<char *>(next_alignment(reinterpret_cast<system_details::pointer_t >(pointer), alignment)); } } } } }