#include "cetl/pmr/memory.hpp"
Public Member Functions | |
| MemoryResourceDeleter (MemoryResourceType *mem_resource, std::size_t mem_size, std::size_t mem_align=alignof(std::max_align_t)) noexcept | |
| MemoryResourceDeleter (MemoryResourceDeleter &&rhs) noexcept | |
| MemoryResourceDeleter & | operator= (MemoryResourceDeleter &&rhs) noexcept |
| MemoryResourceDeleter (const MemoryResourceDeleter &)=delete | |
| MemoryResourceDeleter & | operator= (const MemoryResourceDeleter &)=delete |
| void | operator() (void *p) noexcept |
| std::size_t | size () const noexcept |
| std::size_t | alignment () const noexcept |
| MemoryResourceType * | resource () const noexcept |
RAII helper for MemoryResourceType::allocate() and MemoryResourceType::deallocate().
This type is designed to work with std::unique_ptr.
| MemoryResourceType | The memory resource type. |
Example usage:
|
inlinenoexcept |
Designated constructor.
| mem_resource | The memory resource to use for deallocation. |
| mem_size | The size of the memory to deallocate. |
| mem_align | The alignment of the memory to deallocate. |
Referenced by MemoryResourceDeleter(), and operator=().

|
inlinenoexcept |
To support unique_ptr move semantics.
| rhs | The deleter to move from. |
References MemoryResourceDeleter().
|
inlinenoexcept |
Alignment of the memory this deleter will or did deallocate.
|
inlinenoexcept |
Functor called by smart-pointer to deallocate memory.
| p | The memory to deallocate. |
References CETL_DEBUG_ASSERT.
|
inlinenoexcept |
To support unique_ptr move semantics.
| rhs | The deleter to move from. |
References MemoryResourceDeleter().
|
inlinenoexcept |
The memory resource this deleter will or did use to deallocate memory.
|
inlinenoexcept |
Size of the memory this deleter will or did deallocate.