Struct MemoryResourceLinear
Defined in File rapidyaml-0.5.0.hpp
Inheritance Relationships
Base Type
public c4::detail::_MemoryResourceSingleChunk(Struct _MemoryResourceSingleChunk)
Derived Type
public c4::MemoryResourceLinearArr< N >(Template Struct MemoryResourceLinearArr)
Struct Documentation
-
struct MemoryResourceLinear : public c4::detail::_MemoryResourceSingleChunk
provides a linear memory resource. Allocates incrementally from a linear buffer, without ever deallocating. Deallocations are a no-op, and the memory is freed only when the resource is release()d. The memory used by this object can be either owned or borrowed. When borrowed, no calls to malloc/free take place.
Subclassed by c4::MemoryResourceLinearArr< N >
Public Functions
-
C4_NO_COPY_OR_MOVE(MemoryResourceLinear)
-
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
-
C4_NO_COPY_OR_MOVE(MemoryResourceLinear)