7#include "../security/module.hpp"
8#include "../macros.hpp"
12hi_export_module(hikogui.memory.secure_memory_allocator);
23 using difference_type = ptrdiff_t;
35 constexpr secure_memory_allocator(secure_memory_allocator<U>
const &other)
noexcept
39 [[nodiscard]] value_type *allocate(size_type n)
const noexcept
43 return reinterpret_cast<value_type *
>(p);
46 void deallocate(value_type *p, size_type n)
const noexcept
51 std::allocator_traits<
decltype(allocator)>::deallocate(allocator,
reinterpret_cast<std::byte *
>(p), n *
sizeof (value_type));
DOXYGEN BUG.
Definition algorithm.hpp:16
void secure_clear(void *ptr, size_t size) noexcept
Securely clear memory.
Definition security_win32.hpp:13
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
Memory allocator which will securely clear the memory when deallocated.
Definition secure_memory_allocator.hpp:19
Definition secure_memory_allocator.hpp:26