40#define G4Allocator_hh 1
123 mem_alloc =
static_cast<Type*
>(::operator
new(n *
sizeof(
Type)));
133 ::operator
delete((
void*) p);
146 return 2147483647 /
sizeof(
Type);
180 tname =
typeid(
Type).name();
197 return static_cast<Type*
>(mem.Alloc());
241 return mem.GetNoPages();
251 return mem.GetPageSize();
262 mem.GrowPageSize(sz);
279template <
class T1,
class T2>
289template <
class T1,
class T2>
bool operator==(const G4Allocator< T1 > &, const G4Allocator< T2 > &)
bool operator!=(const G4Allocator< T1 > &, const G4Allocator< T2 > &)
virtual void IncreasePageSize(unsigned int sz)=0
virtual std::size_t GetAllocatedSize() const =0
virtual ~G4AllocatorBase()=default
virtual const char * GetPoolType() const =0
virtual void ResetStorage()=0
virtual int GetNoPages() const =0
virtual std::size_t GetPageSize() const =0
pointer address(reference r) const
void deallocate(pointer p, size_type n)
void FreeSingle(Type *anElement)
const char * GetPoolType() const override
ptrdiff_t difference_type
size_type max_size() const
pointer allocate(size_type n, void *=nullptr)
std::size_t GetPageSize() const override
void IncreasePageSize(unsigned int sz) override
std::size_t GetAllocatedSize() const override
int GetNoPages() const override
const_pointer address(const_reference r) const
void ResetStorage() override
void construct(pointer p, const Type &val)