4#ifndef TETL_MEMORY_ALIGN_HPP
5#define TETL_MEMORY_ALIGN_HPP
7#include <etl/_bit/bit_cast.hpp>
8#include <etl/_cstddef/size_t.hpp>
9#include <etl/_cstdint/uintptr_t.hpp>
28 off = alignment - off;
30 if (space < off || space - off < size) {
34 ptr =
static_cast<
char*>(ptr) + off;
constexpr auto bit_cast(From const &src) noexcept -> To
Obtain a value of type To by reinterpreting the object representation of from. Every bit in the value...
Definition bit_cast.hpp:39
Definition adjacent_find.hpp:9
auto align(etl::size_t alignment, etl::size_t size, void *&ptr, etl::size_t &space) noexcept -> void *
Given a pointer ptr to a buffer of size space, returns a pointer aligned by the specified alignment f...
Definition align.hpp:23