ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
Snapshot Class Reference

Description:

Stores the actual state of outer class MonoAllocator. Retrieved method MonoAllocator::TakeSnapshot and MonoAllocator::Reset(Snapshot).

Definition at line 160 of file monoallocator.hpp.

#include <monoallocator.hpp>

Collaboration diagram for Snapshot:
[legend]

Public Method Index:

constexpr Snapshot () noexcept
 
constexpr bool IsValid () noexcept
 

Protected Field Index:

char * actFill
 Pointer to the first free byte in the current buffer.
 
detail::Bufferbuffer
 The current buffer.
 

Protected Method Index:

constexpr Snapshot (detail::Buffer *pBuffer, char *pFill) noexcept
 

Field Details:

◆ actFill

char* actFill
protected

Pointer to the first free byte in the current buffer.

Definition at line 168 of file monoallocator.hpp.

◆ buffer

detail::Buffer* buffer
protected

The current buffer.

Definition at line 167 of file monoallocator.hpp.

Constructor(s) / Destructor Details:

◆ Snapshot() [1/2]

Snapshot ( detail::Buffer * pBuffer,
char * pFill )
inlineconstexprprotectednoexcept

Internal constructor.

Parameters
pBufferThe current buffer.
pFillThe current fill of buffer.

Definition at line 173 of file monoallocator.hpp.

◆ Snapshot() [2/2]

Snapshot ( )
inlineconstexprnoexcept

Default constructor.

Note
Default-constructed snapshots passed to method MonoAllocator::Reset(Snapshot) do reset the monotonic allocator to its initial state after construction. All monotonic allocated memory is considered 'freed' then.

Definition at line 183 of file monoallocator.hpp.

Method Details:

◆ IsValid()

bool IsValid ( )
inlineconstexprnoexcept

Returns false if this snapshot was never initialized properly (default constructed and not copied over).

Returns
true if this is not a valid snapshot, false otherwise.

Definition at line 190 of file monoallocator.hpp.


The documentation for this class was generated from the following file: