#include "cetl/pf17/array_memory_resource.hpp"
Public Member Functions | |
UnsynchronizedArrayMemoryResource (cetl::pf17::pmr::memory_resource *upstream, std::size_t upstream_max_size_bytes) noexcept | |
UnsynchronizedArrayMemoryResource () noexcept | |
UnsynchronizedArrayMemoryResource (const UnsynchronizedArrayMemoryResource &)=delete | |
UnsynchronizedArrayMemoryResource & | operator= (const UnsynchronizedArrayMemoryResource &)=delete |
UnsynchronizedArrayMemoryResource (UnsynchronizedArrayMemoryResource &&) noexcept=delete | |
UnsynchronizedArrayMemoryResource & | operator= (UnsynchronizedArrayMemoryResource &&)=delete |
void * | data () noexcept |
const void * | data () const noexcept |
std::size_t | size () const noexcept |
![]() | |
memory_resource ()=default | |
memory_resource (const memory_resource &rhs)=default | |
virtual | ~memory_resource ()=default |
memory_resource & | operator= (const memory_resource &rhs)=default |
void * | allocate (std::size_t size_bytes, std::size_t alignment=alignof(std::max_align_t)) |
void | deallocate (void *p, std::size_t size_bytes, std::size_t alignment=alignof(std::max_align_t)) |
bool | is_equal (const memory_resource &rhs) const noexcept |
std::size_t | max_size () const noexcept |
void * | reallocate (void *ptr, std::size_t old_size_bytes, std::size_t new_size_bytes, std::size_t alignment=alignof(std::max_align_t)) |
Implementation of cetl::pf17::pmr::memory_resource that uses cetl::pmr::UnsynchronizedBufferMemoryResourceDelegate as the internal implementation backed by an std::array data member using array_size * sizeof(cetl::pf17::byte)
s of memory.
|
inlinenoexcept |
See cetl::pmr::UnsynchronizedBufferMemoryResourceDelegate for details.
upstream | The upstream memory resource to provide to cetl::pmr::UnsynchronizedBufferMemoryResourceDelegate. This cannot be null. |
upstream_max_size_bytes | The maximum size of the upstream memory resource. |
|
inlinenoexcept |
Constructor version that uses cetl::pf17::pmr::null_memory_resource as the upstream resource.
|
inlinenoexcept |
Direct access to the internal data. It is generally not safe to use this memory directly.
|
inlinenoexcept |
|
inlinenoexcept |
The size in bytes of the internal buffer.