|
ATLAS Offline Software
|
Go to the documentation of this file.
49 lock_t alloc_lock (*alloc.m_mutex);
50 alloc.m_alloc->reset();
65 lock_t alloc_lock (*alloc.m_mutex);
66 alloc.m_alloc->erase();
87 lock_t alloc_lock (*alloc.m_mutex);
88 alloc.m_alloc->report (
os);
103 lock_t alloc_lock (*alloc.m_mutex);
104 stats += alloc.m_alloc->stats();
139 std::unique_ptr<ArenaAllocatorBase> alloc =
144 m_allocs[
i].m_mutex = std::make_unique<std::mutex>();
static ArenaAllocatorRegistry * instance()
Return a pointer to the global ArenaAllocatorRegistry instance.
virtual ~ArenaBase()
Destructor.
std::vector< AllocEntry > m_allocs
ArenaAllocatorBase * makeAllocator(size_t i)
Make a new Allocator for index i.
ArenaBase(const std::string &name="")
Constructor.
void report(std::ostream &os) const
Generate a report of the memory in use by this Arena.
Statistics for an allocator.
std::string m_name
Our name.
void reset()
Reset all contained allocators.
Common base class for arena allocator classes. See Arena.h for an overview of the arena-based memory ...
std::unique_ptr< ArenaAllocatorBase > create(size_t i)
Create a new instance of an allocator.
Common base class for arena allocator classes.
void erase()
Erase all contained allocators.
Part of Arena dealing with the list of allocators. Broken out from Arena to avoid a dependency loop w...
static void header(std::ostream &os)
Print report header.
std::lock_guard< std::mutex > lock_t
ArenaAllocatorBase::Stats stats() const
Return statistics summed over all allocators in this Arena.
Registry of allocator factories. See Arena.h for an overview of the arena-based memory allocators.
std::mutex m_mutex
To guard access to m_allocs.
const std::string & name() const
Return this Arena's name.