7#include "../security/security.hpp"
8#include "../macros.hpp"
13hi_export_module(hikogui.memory.secure_memory_allocator);
15hi_export
namespace hi::inline
v1 {
24 using difference_type = ptrdiff_t;
36 constexpr secure_memory_allocator(secure_memory_allocator<U>
const &other)
noexcept
40 [[nodiscard]] value_type *allocate(size_type n)
const noexcept
44 return reinterpret_cast<value_type *
>(p);
47 void deallocate(value_type *p, size_type n)
const noexcept
52 std::allocator_traits<
decltype(allocator)>::deallocate(allocator,
reinterpret_cast<std::byte *
>(p), n *
sizeof (value_type));
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
void secure_clear(void *ptr, size_t size) noexcept
Securely clear memory.
Definition security_win32_impl.hpp:16
Memory allocator which will securely clear the memory when deallocated.
Definition secure_memory_allocator.hpp:20
Definition secure_memory_allocator.hpp:27