35#ifndef _UTILS_ALLOCATOR_HXX_
36#define _UTILS_ALLOCATOR_HXX_
146 for (
size_t i = 0; i <
max_size(); ++i)
This is a custom allocator that limits the number of mappings.
Allocator(Allocator const &a)
Copy constructor.
void construct(T *p, const T &t)
Placement constructor.
T * allocate(size_t cnt, const void *=0)
Allocate item(s) out of the pool.
value_type & reference
reference required by stl
const T * address(const T &r)
Const address of item.
const value_type * const_pointer
const_pointer required by stl
T value_type
value_type required by stl
bool init
flag that tell us if we have initilized our selves or not
const value_type & const_reference
const_reference required by stl
std::size_t size_type
size_type required by stl
size_t max_size() const
Maximum number of items that can be allocated.
Allocator()
Default Constructor.
bool operator==(Allocator const &)
Overloaded operator ==.
Allocator(Allocator< U > const &o)
template copy constructor.
bool operator!=(Allocator const &a)
Overloaded operator !=.
Allocator(size_t e)
Constructor.
void deallocate(T *p, size_t n)
Free itme.
value_type * pointer
pointer required by stl
void destroy(T *p)
Destruct.
FreeList * freeList
Start of free list.
T * address(T &r)
Address of item.
std::ptrdiff_t difference_type
difference_type required by stl
size_t entries
number of elements in the fixed size pool
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.
typedef for allocator specialization
Allocator< U > other
typedef for allocator specialization
FreeList * next
next item in the list