Memory.h file
Namespace Death::
Namespaces
- namespace Death
- Shared root namespace.
- namespace Death::Memory
- Memory-related utilities.
Functions
-
template<class T, std::auto AllocateAligned(std::
size_t alignment = alignof(T)> size_t size) -> Containers::Array<T> - Allocate aligned memory and value-initialize it.
-
template<class T, std::auto AllocateAligned(Containers::ValueInitT, std::
size_t alignment = alignof(T)> size_t size) -> Containers::Array<T> - Allocate aligned memory and value-initialize it.
-
template<class T, std::auto AllocateAligned(Containers::NoInitT, std::
size_t alignment = alignof(T)> size_t size) -> Containers::Array<T> - Allocate aligned memory and leave it uninitialized.
-
template<typename T>auto AsBE(T value) -> T
- Converts a value from/to Big-Endian.
-
template<typename T>auto AsLE(T value) -> T
- Converts a value from/to Little-Endian.
-
template<typename T, typename std::auto LoadUnaligned(const void* p) -> T constexpr noexcept
enable_if<std:: is_trivially_copyable<T>::value, int>::type = 0> - Returns a value of given size from unaligned pointer.
-
template<typename T, typename std::void StoreUnaligned(void* p, T v) constexpr noexcept
enable_if<std:: is_trivially_copyable<T>::value, int>::type = 0> - Stores a value of given size to unaligned pointer.
-
template<class T>auto SwapBytes(T value) -> T
- Endian-swap bytes of given value.