|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef ATHALLOCATORS_ARENABLOCKALLOCATORBASE_H
14 #define ATHALLOCATORS_ARENABLOCKALLOCATORBASE_H
103 virtual void erase()
override;
115 virtual const std::string&
name()
const override;
169 #endif // not ATHALLOCATORS_ARENABLOCKALLOCATORBASE_H
const Params & params() const
Return this Allocator's parameters.
virtual void reserve(size_t size) override
Set the total number of elements cached by the allocator.
ArenaBlock * m_blocks
The list of blocks currently in use.
virtual ~ArenaBlockAllocatorBase()
Destructor.
ArenaBlock * getBlock()
Return an empty block, either newly-allocated or from the free list.
Params m_params
The parameters for this allocator.
virtual void erase() override
Free all allocated elements and release memory back to the system.
virtual const std::string & name() const override
Return the name of this allocator.
bool m_protected
Flag whether the arena has been protected.
ArenaBlockAllocatorBase(const ArenaBlockAllocatorBase &)=delete
Don't allow copy construction or assignment.
ArenaBlockAllocatorBase(const Params ¶ms)
Constructor.
Statistics for an allocator.
virtual Stats stats() const override
Return the statistics block for this allocator.
Common base class for arena allocator classes. See Arena.h for an overview of the arena-based memory ...
Common base class for arena allocator classes.
Common functionality for block-oriented allocators.
A large memory block that gets carved into smaller uniform elements.
ArenaBlockAllocatorBase & operator=(const ArenaBlockAllocatorBase &)=delete
ArenaAllocatorBase::Stats m_stats
The statistics structure.
void unprotect()
Write-enable the memory managed by this allocator.
void swap(ArenaBlockAllocatorBase &other)
Swap.
ArenaBlock * m_freeblocks
The list of free blocks.
void protect()
Write-protect the memory managed by this allocator.