|
| LokiAllocator (void) throw () |
| Default constructor does nothing.
|
|
| LokiAllocator (const LokiAllocator &) throw () |
| Copy constructor does nothing.
|
|
template<typename Type1 > |
| LokiAllocator (const LokiAllocator< Type1 > &) throw () |
| Type converting allocator constructor does nothing.
|
|
| ~LokiAllocator () throw () |
| Destructor does nothing.
|
|
pointer | address (reference elem) const |
| Return address of reference to mutable element.
|
|
const_pointer | address (const_reference elem) const |
| Return address of reference to const element.
|
|
pointer | allocate (size_type count, const void *hint=0) |
|
void | deallocate (pointer p, size_type size) |
| Ask allocator to release memory at pointer with size bytes.
|
|
size_type | max_size (void) const throw () |
| Calculate max # of elements allocator can handle.
|
|
void | construct (pointer p, const Type &value) |
| Construct an element at the pointer.
|
|
void | destroy (pointer p) |
| Destruct the object at pointer.
|
|
template<typename Type, typename AllocT = Loki::AllocatorSingleton<>>
class Loki::LokiAllocator< Type, AllocT >
Adapts Loki's Small-Object Allocator for STL container classes. This class provides all the functionality required for STL allocators, but uses Loki's Small-Object Allocator to perform actual memory operations. Implementation comes from a post in Loki forums (by Rasmus Ekman?).