ATLAS Offline Software
|
Forward declaration. More...
#include <ArenaPoolSTLAllocator.h>
Public Member Functions | |
template<class U , class V > | |
ArenaNonConstPoolSTLAllocator (const ArenaPoolSTLAllocator< U, V > &a, ArenaBlockAllocatorBase *poolptr_nc) | |
Constructor. More... | |
void | reset () |
Free all allocated elements. More... | |
void | erase () |
Free all allocated elements and release memory back to the system. More... | |
void | reserve (size_t size) |
Set the total number of elements cached by the allocator. More... | |
void | protect () |
Write-protect the memory managed by this allocator. More... | |
void | unprotect () |
Write-enable the memory managed by this allocator. More... | |
Private Attributes | |
ArenaBlockAllocatorBase * | m_poolptr_nc |
Non-const pointer to the underlying allocator. More... | |
Forward declaration.
STL-style allocator wrapper for ArenaPoolAllocator
.
Non-const variant for the case of the vetoed type.
See documentation above for details.
Definition at line 423 of file ArenaPoolSTLAllocator.h.
SG::ArenaNonConstPoolSTLAllocator< T >::ArenaNonConstPoolSTLAllocator | ( | const ArenaPoolSTLAllocator< U, V > & | a, |
ArenaBlockAllocatorBase * | poolptr_nc | ||
) |
Constructor.
a | Allocator to reference. |
poolptr_nc | Non-const pointer to the underlying allocator. |
void SG::ArenaNonConstPoolSTLAllocator< T >::erase | ( | ) |
Free all allocated elements and release memory back to the system.
All elements allocated are freed, and all allocated blocks of memory are released back to the system. destructor
should be called on them if it was provided (preceded by clear
if provided and mustClear
was set).
void SG::ArenaNonConstPoolSTLAllocator< T >::protect | ( | ) |
Write-protect the memory managed by this allocator.
Adjust protection on the memory managed by this allocator to disallow writes.
void SG::ArenaNonConstPoolSTLAllocator< T >::reserve | ( | size_t | size | ) |
Set the total number of elements cached by the allocator.
size | The desired pool size. |
This allows changing the number of elements that are currently free but cached. Any allocated elements are not affected by this call.
If size
is greater than the total number of elements currently cached, then more will be allocated. This will preferably done with a single block, but that is not guaranteed; in addition, the allocator may allocate more elements than is requested.
If size
is smaller than the total number of elements currently cached, as many blocks as possible will be released back to the system. It may not be possible to release the number of elements requested; this should be implemented on a best-effort basis.
void SG::ArenaNonConstPoolSTLAllocator< T >::reset | ( | ) |
Free all allocated elements.
All elements allocated are returned to the free state. clear
should be called on them if it was provided. The elements may continue to be cached internally, without returning to the system.
void SG::ArenaNonConstPoolSTLAllocator< T >::unprotect | ( | ) |
Write-enable the memory managed by this allocator.
Adjust protection on the memory managed by this allocator to allow writes.
|
private |
Non-const pointer to the underlying allocator.
Definition at line 617 of file ArenaPoolSTLAllocator.h.