18#ifndef ATLALLOCATORS_ARENAHEAPALLOCATOR_H
19#define ATLALLOCATORS_ARENAHEAPALLOCATOR_H
100 initParams (
size_t nblock = 1000,
const std::string& name =
"");
185 virtual void erase() override final;
220#include "AthAllocators/ArenaHeapAllocator.icc"
Common functionality for block-oriented allocators.
void clear()
Empty the pool.
Common functionality for block-oriented allocators.
A large memory block that gets carved into smaller uniform elements.
ArenaHeapAllocator & operator=(const ArenaHeapAllocator &)=delete
virtual ~ArenaHeapAllocator()
Destructor.
pointer m_freeptr
Pointer to the next free element.
pointer allocate()
Allocate a new element.
void slowClear()
Call clear() for all allocated elements.
void free(pointer p)
Free an element.
pointer & link(pointer p) const
Return a reference to the link for an element.
pointer refill()
Add more free elements to the pool, and allocate a new element.
virtual void erase() override final
Free all allocated elements and release memory back to the system.
virtual void reset() override
Free all allocated elements.
void swap(ArenaHeapAllocator &other)
Swap.
ArenaHeapAllocator(const Params ¶ms)
Constructor.
Helper to initialize a parameters structure.
initParams(size_t nblock=1000, const std::string &name="")
Constructor.
ArenaAllocatorBase::initParams< T, clear, no_ctor, no_dtor > Base
ArenaAllocatorBase::Params params() const
Return an initialized parameters structure.