Struct _MemoryResourceSingleChunk
Defined in File rapidyaml-0.5.0.hpp
Inheritance Relationships
Base Type
public c4::detail::DerivedMemoryResource
(Struct DerivedMemoryResource)
Derived Types
public c4::MemoryResourceLinear
(Struct MemoryResourceLinear)public c4::MemoryResourceStack
(Struct MemoryResourceStack)
Struct Documentation
-
struct _MemoryResourceSingleChunk : public c4::detail::DerivedMemoryResource
Provides common facilities for memory resource consisting of a single memory block
Subclassed by c4::MemoryResourceLinear, c4::MemoryResourceStack
Public Types
-
using impl_type = DerivedMemoryResource
Public Functions
-
C4_NO_COPY_OR_MOVE(_MemoryResourceSingleChunk)
-
inline _MemoryResourceSingleChunk(MemoryResource *impl = nullptr)
-
inline _MemoryResourceSingleChunk(size_t sz, MemoryResource *impl = nullptr)
initialize with owned memory, allocated from the given (or the global) memory resource
-
inline _MemoryResourceSingleChunk(void *mem, size_t sz)
initialize with borrowed memory
-
inline virtual ~_MemoryResourceSingleChunk() override
-
inline void const *mem() const
-
inline size_t capacity() const
-
inline size_t size() const
-
inline size_t slack() const
-
inline void clear()
set the internal pointer to the beginning of the linear buffer
-
void acquire(size_t sz)
initialize with owned memory, allocated from the global memory resource
-
void acquire(void *mem, size_t sz)
initialize with borrowed memory
-
void release()
release the memory
-
using impl_type = DerivedMemoryResource