|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef ATHALLOCATORS_ARENAPOOLALLOCATOR_H
14 #define ATHALLOCATORS_ARENAPOOLALLOCATOR_H
18 #include "boost/iterator/iterator_adaptor.hpp"
54 :
public boost::iterator_adaptor<
58 boost::forward_traversal_tag>
100 :
public boost::iterator_adaptor<
104 boost::forward_traversal_tag>
193 virtual void reset()
override;
205 virtual void erase() override final;
273 #include "AthAllocators/ArenaPoolAllocator.icc"
276 #endif // not ATHALLOCATORS_ARENAPOOLALLOCATOR_H
const Params & params() const
Return this Allocator's parameters.
void refill()
Add more free elements to the pool.
void resetTo(pointer p)
Reset pool back to a previous state.
void increment()
Move the iterator forward.
const_iterator()
Default constructor.
const ArenaBlock * m_block
Block containing the current element.
friend class boost::iterator_core_access
bool const RAWDATA *ch2 const
void swap(ArenaPoolAllocator &other)
Swap.
iterator(pointer p, ArenaBlock *block)
Constructor.
ArenaPoolAllocator & operator=(const ArenaPoolAllocator &)=delete
pointer m_end
One past the last available element in the current block, of null.
void clearBlock()
Reset all elements in the topmost block, and move the block to the free list.
pointer m_ptr
Pointer to the next free element to allocate, or null.
ArenaPoolAllocator(const ArenaPoolAllocator &)=delete
Don't allow copy construction or assignment.
friend class boost::iterator_core_access
Common functionality for block-oriented allocators.
iterator()
Default constructor.
Common functionality for block-oriented allocators.
Non-const iterator for the pool.
ArenaBlock * m_block
Block containing the current element.
A large memory block that gets carved into smaller uniform elements.
iterator begin()
Starting pool iterator.
virtual void reset() override
Free all allocated elements.
const_iterator(const iterator &it)
Constructor from iterator.
void increment()
Move the iterator forward.
virtual void erase() override final
Free all allocated elements and release memory back to the system.
ArenaPoolAllocator(const Params ¶ms)
Constructor.
virtual ~ArenaPoolAllocator()
Destructor.
char * pointer
Type for pointers to elements.
pointer allocate()
Allocate a new element.
iterator end()
Ending pool iterator.
Const iterator for the pool.
const_iterator(pointer p, const ArenaBlock *block)
Constructor.