|
ATLAS Offline Software
|
Go to the documentation of this file.
59 #ifndef ATLALLOCATORS_ARENASHAREDHEAPSTLALLOCATOR_H
60 #define ATLALLOCATORS_ARENASHAREDHEAPSTLALLOCATOR_H
154 void report (std::ostream&
os)
const;
505 #endif // not ATLALLOCATORS_ARENASHAREDHEAPSTLALLOCATOR_H
ArenaSharedHeapSTLAllocator(ArenaSharedHeapSTLAllocator &&a)=default
Move constructor is the same as the copy constructor.
pointer allocate(size_type n, const void *hint=0)
Allocate new objects.
ArenaSharedHeapSTLAllocator< U > other
bool operator!=(const ArenaSharedHeapSTLAllocator &other) const
Inequality test.
~ArenaSharedHeapSTLAllocator()
Destructor.
void reserve(size_t size)
Set the total number of elements cached by the allocator.
void construct(pointer p, Args &&... args)
Call the T constructor.
void destroy(pointer p)
Call the T destructor.
void maybeUnprotect(ArenaHeapSTLAllocator< T, VETO > &a)
Hook for unprotecting an arena.
bool const RAWDATA *ch2 const
void reset()
Free all allocated elements.
ArenaSharedHeapSTLAllocator(size_t nblock=1000)
Default constructor.
ptrdiff_t difference_type
const std::string & name() const
Return the name of this allocator.
ArenaHeapAllocator * poolptr()
Return a pointer to the underlying allocator.
size_type max_size() const
Return the maximum number of objects we can allocate at once.
Statistics for an allocator.
void protect()
Write-protect the memory managed by these allocators.
bool operator==(const ArenaSharedHeapSTLAllocator &other) const
Equality test.
std::true_type propagate_on_container_move_assignment
Move allocators on move/swap.
Common base class for arena allocator classes.
void erase()
Free all allocated elements and release memory back to the system.
std::false_type propagate_on_container_copy_assignment
When we assign to a container, the target should retain its allocator.
pointer address(reference x) const
Convert a reference to an address.
Standard STL allocator rebinder.
ATH_MEMBER_REQUIRES(!(std::is_same_v< reference, const_reference >), const_pointer) address(const_reference x) const
ArenaSharedHeapSTLAllocator(const ArenaSharedHeapSTLAllocator< U > &a)
Constructor from another ArenaSharedHeapSTLAllocator.
ArenaSharedHeapSTLAllocator & operator=(const ArenaSharedHeapSTLAllocator &a)
Assignment.
size_t nblock() const
Return the hinted number of objects allocated per block.
Compatibility helpers for using some pieces of C++20 concepts with older compilers.
void report(std::ostream &os) const
Generate printable report for all contained allocators.
ArenaSharedHeapSTLAllocator(const ArenaSharedHeapSTLAllocator &a)
Copy constructor.
std::true_type propagate_on_container_swap
ArenaAllocatorBase::Stats stats() const
Return the statistics block for this allocator.
ArenaHeapAllocator * m_pool
void swap(ArenaSharedHeapSTLAllocator &a)
Swap.
void unprotect()
Write-enable the memory managed by these allocators.
#define ATLAS_THREAD_SAFE
ArenaSharedHeapSTLHeader * m_header
Registry of allocator factories. See Arena.h for an overview of the arena-based memory allocators.
void deallocate(pointer, size_type n)
Deallocate objects.
STL-style allocator wrapper for ArenaHeapAllocator.
ArenaAllocatorBase::Stats totstats() const
Return the statistics blocks summed up over all allocators using this pool.
Heap-based allocator. See Arena.h for an overview of the arena-based memory allocators.
T * pointer
Standard STL allocator typedefs.
const T & const_reference