2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 * @file AthAllocators/ArenaPoolAllocator.icc
8 * @brief Pool-based allocator.
9 * Inline implementations.
17 * @brief Default constructor.
20 ArenaPoolAllocator::iterator::iterator()
21 : iterator::iterator_adaptor_ (0),
29 * @param p Pointer to the element.
30 * @param block Block containing the element.
33 ArenaPoolAllocator::iterator::iterator (pointer p, ArenaBlock* block)
34 : iterator::iterator_adaptor_ (p),
41 * @brief Default constructor.
44 ArenaPoolAllocator::const_iterator::const_iterator ()
45 : const_iterator::iterator_adaptor_ (0),
53 * @param p Pointer to the element.
54 * @param block Block containing the element.
57 ArenaPoolAllocator::const_iterator::const_iterator (pointer p,
58 const ArenaBlock* block)
59 : const_iterator::iterator_adaptor_ (p),
66 * @brief Constructor from @c iterator.
67 * @param it The iterator to copy.
70 ArenaPoolAllocator::const_iterator::const_iterator (const iterator& it)
71 : const_iterator::iterator_adaptor_ (it.base_reference()),
78 * @brief Allocate a new element.
80 * The fast path of this will be completely inlined.
83 ArenaPoolAllocator::pointer ArenaPoolAllocator::allocate()
85 // If there are no free elements get more.
89 // Take the first free element.
91 m_ptr = m_ptr + m_params.eltSize;