template<int64_t num_bytes_t, bool use_header = true>
vt::pool::MemoryPoolEqual struct

Memory pool based on size and whether to use the header. The header contains additional information about messages that may not always be needed.

Public types

using ContainerType = std::vector<std::byte*>
using SlotType = int64_t
using HeaderType = Header
using HeaderManagerType = HeaderManager

Public static variables

static const SlotType fst_pool_slot constexpr
static const SlotType default_pool_size constexpr

Constructors, destructors, conversion operators

MemoryPoolEqual(SlotType const in_pool_size = default_pool_size)
Construct a memory pool.
~MemoryPoolEqual() virtual

Public functions

auto alloc(size_t const& sz, size_t const& oversize) -> std::byte*
void dealloc(std::byte*const t)
void resizePool()
auto getNumBytes() -> SlotType
template<typename Serializer>
void serialize(Serializer& s)

Function documentation

template<int64_t num_bytes_t, bool use_header>
vt::pool::MemoryPoolEqual<num_bytes_t, use_header>::MemoryPoolEqual(SlotType const in_pool_size = default_pool_size)

Construct a memory pool.

Parameters
in_pool_size in the size of the pool in bytes