58 #ifndef GAUDIKERNEL_Allocator_h 59 #define GAUDIKERNEL_Allocator_h 1 134 mem_alloc = static_cast<Type*>( ::
operator new(
n *
sizeof(
Type ) ) );
145 ::operator
delete( (
void*)p );
158 return 2147483647 /
sizeof(
Type );
186 template <
class Type>
193 template <
class Type>
200 template <
class Type>
202 return static_cast<Type*>( mem.Alloc() );
209 template <
class Type>
211 mem.Free( anElement );
219 template <
class Type>
231 template <
class Type>
240 template <
class T1,
class T2>
249 template <
class T1,
class T2>
Type * MallocSingle()
Malloc and Free methods to be used when overloading new and delete operators in the client <Type> obj...
bool operator!=(const GaudiUtils::Allocator< T1 > &, const GaudiUtils::Allocator< T2 > &)
Allocator(const Allocator< U > &right)
Copy constructor.
ptrdiff_t difference_type
void FreeSingle(Type *anElement)
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 ResetStorage()
Returns allocated storage to the free store, resets allocator and page sizes.
size_t GetAllocatedSize() const
Returns the size of the total memory allocated.
GaudiUtils::AllocatorPool mem
const Type * const_pointer
void destroy(pointer p)
Destroy *p but doesn't deallocate.
void construct(pointer p, const Type &val)
Initialises *p by val.
bool operator==(const GaudiUtils::Allocator< T1 > &, const GaudiUtils::Allocator< T2 > &)
pointer allocate(size_type n, void *=0)
Allocates space for n elements of type Type, but does not initialise.
const Type & const_reference
const_pointer address(const_reference r) const
Forward declarations for the functions in SerializeSTL.h.
size_type max_size() const
Returns the maximum number of elements that can be allocated.
Type
the list of available types for ntuples