ATLAS Offline Software
Loading...
Searching...
No Matches
ArenaHandleBase.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id: ArenaHandleBase.h 470529 2011-11-24 23:54:22Z ssnyder $
8
17
18#ifndef ATLALLOCATORS_ARENAHANDLEBASE_H
19#define ATLALLOCATORS_ARENAHANDLEBASE_H
20
24#include <cstdlib>
25
26
27namespace SG {
28
29
59{
60public:
68
69
77 ArenaHandleBase (ArenaHeader* header, const EventContext& ctx, size_t index);
78
79
85 ArenaHandleBase (ArenaBase* arena, size_t index);
86
87
97 void reset();
98
99
110 void erase();
111
112
131 void reserve (size_t size);
132
133
139
140
141protected:
148
149
156
157
158private:
161};
162
163
164} // namespace SG
165
166
168
169
170#endif // not ATLALLOCATORS_ARENAHANDLEBASE_H
Common base class for arena allocator classes. See Arena.h for an overview of the arena-based memory ...
Proxy for a group of Arenas. See Arena.h for an overview of the arena-based memory allocators.
A pointer type that holds a lock on an allocator object.
Common base class for arena allocator classes.
Part of Arena dealing with the list of allocators.
Definition ArenaBase.h:42
const ArenaAllocatorBase * baseAllocator() const
Return the current Allocator which we are referencing.
ArenaHandleBase(ArenaHeader *header, size_t index)
Constructor.
ArenaAllocatorBase * baseAllocator()
Return the current Allocator which we are referencing.
void reset()
Free all allocated elements (of this type in the current Arena).
void reserve(size_t size)
Set the total number of elements cached by the allocator (in the current Arena).
void erase()
Free all allocated elements and release memory back to the system (of this type in the current Arena)...
ArenaAllocatorBase::Stats stats() const
Return the statistics block for this allocator, for the current Arena.
LockedAllocator m_allocator
The associated allocator object.
Proxy for a group of Arenas.
Definition ArenaHeader.h:54
A pointer type that holds a lock on an allocator object.
Forward declaration.
Definition index.py:1
Statistics for an allocator.