6 #include <libcaramel/util/crtp.hpp>
7 #include <libcaramel/util/types.hpp>
9 #include <gsl/pointers>
13 template <
typename Any>
18 using const_pointer =
const Any*;
29 return *resource() == *alloc.resource();
32 auto allocate(
count_t count) -> pointer
34 return static_cast<pointer
>(
37 void deallocate(gsl::not_null<pointer> ptr,
count_t count)
Definition: memory_allocator.hpp:15
Abstract class defining the interface of a memory resource.
Definition: memory_resource.hpp:23
virtual auto allocate(count_t bytes, align_t alignment) noexcept -> pointer=0
Pure virtual function for a common allocation interface.
virtual void deallocate(gsl::not_null< pointer > ptr, count_t bytes, align_t alignment) noexcept=0
Pure virtual function for a common deallocation interface.
void * pointer
alias for ease of naming
Definition: memory_resource.hpp:25
Definition: strong_type.hpp:12