8#ifndef INCLUDED_BSLMA_MEMORYRESOURCE
9#define INCLUDED_BSLMA_MEMORYRESOURCE
412#include <bslscm_version.h>
420#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
423# include <memory_resource>
427using std::pmr::memory_resource;
447 k_MAX_ALIGN = BloombergLP::bsls::AlignmentUtil::BSLS_MAX_ALIGNMENT
464 BSLS_KEYWORD_DEFAULT;
476 void *
allocate(
size_t bytes,
size_t alignment = k_MAX_ALIGN);
486 void deallocate(
void *p,
size_t bytes,
size_t alignment = k_MAX_ALIGN);
505 virtual
void* do_allocate(
size_t bytes,
size_t alignment) = 0;
513 virtual
void do_deallocate(
void* p,
size_t bytes,
size_t alignment) = 0;
552 return do_allocate(bytes, alignment);
558 do_deallocate(p, bytes, alignment);
566 return do_is_equal(other);
Definition bslma_memoryresource.h:443
bool is_equal(const memory_resource &other) const BSLS_KEYWORD_NOEXCEPT
Definition bslma_memoryresource.h:563
BSLA_NODISCARD void * allocate(size_t bytes, size_t alignment=k_MAX_ALIGN)
Definition bslma_memoryresource.h:550
void deallocate(void *p, size_t bytes, size_t alignment=k_MAX_ALIGN)
Definition bslma_memoryresource.h:556
memory_resource() BSLS_KEYWORD_DEFAULT
Create this object. Has no effect other than to begin its lifetime.
#define BSLA_NODISCARD
Definition bsla_nodiscard.h:320
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:674
Definition bdlat_valuetypefunctions.h:939
bool operator!=(const memory_resource &a, const memory_resource &b)