46 #define G4Allocator_h 1
130 mem_alloc =
static_cast<Type*
>(::operator
new(n*
sizeof(Type)));
140 ::operator
delete((
void*)p);
153 return 2147483647/
sizeof(Type);
181 template <
class Type>
185 tname =
typeid(Type).
name();
192 template <
class Type>
201 template <
class Type>
204 return static_cast<Type*
>(mem.Alloc());
211 template <
class Type>
222 template <
class Type>
235 template <
class Type>
245 template <
class Type>
248 return mem.GetNoPages();
255 template <
class Type>
258 return mem.GetPageSize();
265 template <
class Type>
269 mem.GrowPageSize(sz);
276 template <
class Type>
286 template <
class T1,
class T2>
296 template <
class T1,
class T2>
size_t GetAllocatedSize() const
virtual void ResetStorage()=0
const char * GetPoolType() const
G4Allocator(const G4Allocator< U > &right)
size_type max_size() const
pointer allocate(size_type n, void *=0)
virtual size_t GetPageSize() const =0
void FreeSingle(Type *anElement)
virtual int GetNoPages() const =0
void deallocate(pointer p, size_type n)
virtual ~G4AllocatorBase()
size_t GetPageSize() const
const_pointer address(const_reference r) const
virtual size_t GetAllocatedSize() const =0
void IncreasePageSize(unsigned int sz)
const Type & const_reference
bool operator!=(const BasicVector3D< float > &a, const BasicVector3D< float > &b)
const Type * const_pointer
virtual void IncreasePageSize(unsigned int sz)=0
void construct(pointer p, const Type &val)
bool operator==(const BasicVector3D< float > &a, const BasicVector3D< float > &b)
virtual const char * GetPoolType() const =0
pointer address(reference r) const
ptrdiff_t difference_type