11 #include <libcaramel/util/types.hpp>
13 #include <gsl/pointers>
71 align_t alignment) noexcept = 0;
89 void set_default_memory_resource(gsl::not_null<
memory_resource*> p_resource) noexcept;
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 auto is_equal(const memory_resource &other) const noexcept -> bool=0
Pure virtual function for a common comparison 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
const void * const_pointer
alias for ease of naming
Definition: memory_resource.hpp:26
Definition: strong_type.hpp:12