23 #if defined(ONIXS_CMEMDH_ENABLE_TRACING) 69 virtual void release() = 0;
72 virtual void* allocate(
size_t) = 0;
75 virtual void deallocate(
void*) = 0;
77 #if defined(ONIXS_CMEMDH_ENABLE_TRACING) 78 virtual void trace(std::ostream&) = 0;
136 : pool_(&other.memoryPool())
158 const_reference x)
const 167 assert(NULL != pool_);
169 return static_cast<pointer
> 173 qty *
sizeof(value_type)
183 assert(NULL != pool_);
191 const value_type& obj)
193 new (block) value_type(obj);
207 static_cast<size_type
>(-1) /
270 ONIXS_CMEMDH_EXPORTED
273 size_t,
size_t,
size_t,
size_t);
void construct(pointer block, const value_type &obj)
const Object & const_reference
ONIXS_CMEMDH_EXPORTED MemoryPool * makeMemoryPool(size_t, size_t, size_t, size_t)
const Object * const_pointer
std::ptrdiff_t difference_type
void destroy(pointer obj)
virtual void * allocate(size_t)=0
Allocates memory block of given size.
void deallocate(pointer block, size_type)
pointer address(reference obj) const
MemoryPoolAllocator(MemoryPool &memoryPool)
#define ONIXS_CMEMDH_EXPORTED_CLASS
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
virtual ~MemoryPool()
Destruction is through descendants.
size_type max_size() const
MemoryPoolAllocator(const MemoryPoolAllocator< Other > &other)
MemoryPool & memoryPool() const
MemoryPoolAllocator< Other > other
bool operator==(const MemoryPoolAllocator< Object > &left, const MemoryPoolAllocator< OtherObject > &right)
bool operator!=(const MemoryPoolAllocator< Object > &left, const MemoryPoolAllocator< OtherObject > &right)
pointer allocate(size_type qty)
virtual void deallocate(void *)=0
Releases previously allocated memory block.
const_pointer address(const_reference x) const
MemoryPoolAllocator(const MemoryPoolAllocator &other)
#define ONIXS_CMEMDH_NAMESPACE_END