Loading [MathJax]/extensions/MathMenu.js
Go to the documentation of this file.
124 mem_alloc =
static_cast<Type*
>( ::operator
new(
n *
sizeof( Type ) ) );
135 ::operator
delete( (
void*)p );
148 return 2147483647 /
sizeof( Type );
176 template <
class Type>
183 template <
class Type>
185 return static_cast<Type*
>( mem.Alloc() );
192 template <
class Type>
194 mem.Free( anElement );
202 template <
class Type>
214 template <
class Type>
223 template <
class T1,
class T2>
232 template <
class T1,
class T2>
Allocator(const Allocator< U > &right)
Copy constructor.
ptrdiff_t difference_type
Type * MallocSingle()
Malloc and Free methods to be used when overloading new and delete operators in the client <Type> obj...
void deallocate(pointer p, size_type n)
Deallocates n elements of type Type, but doesn't destroy.
pointer address(reference r) const
Returns the address of values.
void construct(pointer p, const Type &val)
Initialises *p by val.
bool operator==(const GaudiUtils::Allocator< T1 > &, const GaudiUtils::Allocator< T2 > &)
void ResetStorage()
Returns allocated storage to the free store, resets allocator and page sizes.
const Type * const_pointer
size_t GetAllocatedSize() const
Returns the size of the total memory allocated.
GaudiUtils::AllocatorPool mem
void destroy(pointer p)
Destroy *p but doesn't deallocate.
pointer allocate(size_type n, void *=0)
Allocates space for n elements of type Type, but does not initialise.
const_pointer address(const_reference r) const
bool operator!=(const GaudiUtils::Allocator< T1 > &, const GaudiUtils::Allocator< T2 > &)
const Type & const_reference
size_type max_size() const
Returns the maximum number of elements that can be allocated.
void FreeSingle(Type *anElement)