8#ifndef INCLUDED_BSLMA_MEMORYRESOURCE
9#define INCLUDED_BSLMA_MEMORYRESOURCE
411#include <bslscm_version.h>
418#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
421# include <memory_resource>
425using std::pmr::memory_resource;
445 k_MAX_ALIGN = BloombergLP::bsls::AlignmentUtil::BSLS_MAX_ALIGNMENT
462 BSLS_KEYWORD_DEFAULT;
472 void *
allocate(
size_t bytes,
size_t alignment = k_MAX_ALIGN);
480 void deallocate(
void *p,
size_t bytes,
size_t alignment = k_MAX_ALIGN);
497 virtual
void* do_allocate(
size_t bytes,
size_t alignment) = 0;
504 virtual
void do_deallocate(
void* p,
size_t bytes,
size_t alignment) = 0;
543 return do_allocate(bytes, alignment);
549 do_deallocate(p, bytes, alignment);
557 return do_is_equal(other);
Definition bslma_memoryresource.h:441
bool is_equal(const memory_resource &other) const BSLS_KEYWORD_NOEXCEPT
Definition bslma_memoryresource.h:554
BSLS_ANNOTATION_NODISCARD void * allocate(size_t bytes, size_t alignment=k_MAX_ALIGN)
Definition bslma_memoryresource.h:541
void deallocate(void *p, size_t bytes, size_t alignment=k_MAX_ALIGN)
Definition bslma_memoryresource.h:547
memory_resource() BSLS_KEYWORD_DEFAULT
Create this object. Has no effect other than to begin its lifetime.
#define BSLS_ANNOTATION_NODISCARD
Definition bsls_annotation.h:373
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:632
Definition bdlb_printmethods.h:283
bool operator!=(const memory_resource &a, const memory_resource &b)