108 , tname(right.name())
124 mem_alloc =
static_cast<Type*
>(::operator
new(n *
sizeof(
Type)));
134 ::operator
delete((
void*) p);
147 return 2147483647 /
sizeof(
Type);
171template <
typename Type>
188 return static_cast<void*
>(get_allocator()->
MallocSingle());
191 void operator delete(
void* ptr)
201 typedef std::unique_ptr<allocator_type> allocator_ptr;
202 static thread_local allocator_ptr _allocator = allocator_ptr(
new allocator_type);
203 return _allocator.get();
213, tname(typeid(
Type).name())
232 return static_cast<Type*
>(mem.Alloc());
280 return mem.GetNoPages();
291 return mem.GetPageSize();
303 mem.GrowPageSize(sz);
321template <
class T1,
class T2>
332template <
class T1,
class T2>
virtual void IncreasePageSize(unsigned int sz)=0
virtual ~TaskAllocatorBase()
virtual void ResetStorage()=0
virtual size_t GetAllocatedSize() const =0
virtual const char * GetPoolType() const =0
virtual size_t GetPageSize() const =0
virtual int GetNoPages() const =0
void construct(pointer p, const Type &val)
void ResetStorage() override
size_type max_size() const
const char * GetPoolType() const override
ptrdiff_t difference_type
TaskAllocatorImpl(const TaskAllocatorImpl< U > &right)
const Type * const_pointer
const Type & const_reference
size_t GetPageSize() const override
pointer allocate(size_type n, void *=0)
size_t GetAllocatedSize() const override
const_pointer address(const_reference r) const
int GetNoPages() const override
void IncreasePageSize(unsigned int sz) override
pointer address(reference r) const
void FreeSingle(Type *anElement)
void deallocate(pointer p, size_type n)
TaskAllocatorImpl< Type > allocator_type
ptrdiff_t difference_type
const Type & const_reference
const Type * const_pointer
bool operator==(const TaskAllocatorImpl< T1 > &, const TaskAllocatorImpl< T2 > &)
bool operator!=(const TaskAllocatorImpl< T1 > &, const TaskAllocatorImpl< T2 > &)
TaskAllocatorImpl< U > other