Similar to std::pmr::monotonic_buffer_resource, but the initial buffer can be replaced.
More...
#include <SharedMemory.h>
|
| void | reset (void *newBuffer, std::size_t newBufferSize) noexcept |
| | Replaces the initial buffer.
|
| void * | do_allocate (std::size_t bytes, std::size_t alignment) override |
| void | do_deallocate (void *, std::size_t, std::size_t) override |
| bool | do_is_equal (const std::pmr::memory_resource &other) const noexcept override |
Similar to std::pmr::monotonic_buffer_resource, but the initial buffer can be replaced.
◆ SharedMemoryResource() [1/4]
| lmms::SharedMemoryResource::SharedMemoryResource |
( |
| ) |
|
|
default |
◆ SharedMemoryResource() [2/4]
| lmms::SharedMemoryResource::SharedMemoryResource |
( |
void * | buffer, |
|
|
std::size_t | bufferSize ) |
|
inlinenoexcept |
◆ SharedMemoryResource() [3/4]
| lmms::SharedMemoryResource::SharedMemoryResource |
( |
const SharedMemoryResource & | | ) |
|
|
delete |
◆ SharedMemoryResource() [4/4]
| lmms::SharedMemoryResource::SharedMemoryResource |
( |
SharedMemoryResource && | | ) |
|
|
default |
◆ availableBytes()
| auto lmms::SharedMemoryResource::availableBytes |
( |
| ) |
const -> std::size_t |
|
inlinenoexcept |
- Returns
- the number of bytes that can still be allocated
◆ do_allocate()
| void * lmms::SharedMemoryResource::do_allocate |
( |
std::size_t | bytes, |
|
|
std::size_t | alignment ) |
|
inlineoverrideprivate |
◆ do_deallocate()
| void lmms::SharedMemoryResource::do_deallocate |
( |
void * | , |
|
|
std::size_t | , |
|
|
std::size_t | ) |
|
inlineoverrideprivate |
◆ do_is_equal()
| bool lmms::SharedMemoryResource::do_is_equal |
( |
const std::pmr::memory_resource & | other | ) |
const |
|
inlineoverrideprivatenoexcept |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ reset() [1/2]
| void lmms::SharedMemoryResource::reset |
( |
| ) |
|
|
inlinenoexcept |
Returns the buffer back to its initial state.
◆ reset() [2/2]
| void lmms::SharedMemoryResource::reset |
( |
void * | newBuffer, |
|
|
std::size_t | newBufferSize ) |
|
inlineprivatenoexcept |
Replaces the initial buffer.
◆ SharedMemory
template<typename T>
| friend class SharedMemory |
|
friend |
◆ m_availableBytes
| std::size_t lmms::SharedMemoryResource::m_availableBytes = 0 |
|
private |
◆ m_buffer
| void* lmms::SharedMemoryResource::m_buffer = nullptr |
|
private |
◆ m_initialBuffer
| void* lmms::SharedMemoryResource::m_initialBuffer = nullptr |
|
private |
◆ m_initialBufferSize
| std::size_t lmms::SharedMemoryResource::m_initialBufferSize = 0 |
|
private |
The documentation for this class was generated from the following file: