20class locked_memory_allocator {
24 using difference_type = ptrdiff_t;
28 using other = locked_memory_allocator<U>;
31 constexpr locked_memory_allocator() noexcept {};
36 constexpr locked_memory_allocator(locked_memory_allocator<U>
const &other)
noexcept
40 [[nodiscard]] value_type *allocate(size_type n)
const noexcept
42 auto *p = locked_memory_allocator_allocate(n *
sizeof(value_type));
43 return reinterpret_cast<value_type *
>(p);
46 void deallocate(value_type *p, size_type n)
const noexcept
48 locked_memory_allocator_deallocate(
reinterpret_cast<std::byte *
>(p), n *
sizeof(value_type));