|
rheolef
6.3
|
heap_allocator - heap-based allocator More...
#include <heap_allocator.h>

Classes | |
| struct | handler_type |
| struct | rebind |
Public Types | |
| typedef size_t | size_type |
| typedef std::ptrdiff_t | difference_type |
| typedef T * | pointer |
| typedef const T * | const_pointer |
| typedef T & | reference |
| typedef const T & | const_reference |
| typedef T | value_type |
Public Member Functions | |
| heap_allocator () throw () | |
| heap_allocator (const heap_allocator &ha) throw () | |
| template<typename U > | |
| heap_allocator (const heap_allocator< U > &ha) throw () | |
| ~heap_allocator () throw () | |
| heap_allocator & | operator= (const heap_allocator &ha) |
| pointer | address (reference r) const |
| const_pointer | address (const_reference c) const |
| size_type | max_size () const |
| void | construct (pointer p, const_reference c) |
| void | construct (pointer p) |
| void | destroy (pointer p) |
| pointer | allocate (size_type n, const void *=NULL) |
| void | deallocate (pointer p, size_type n) |
| const handler_type * | get_handler () const |
Protected Attributes | |
| handler_type * | handler |
Friends | |
| class | heap_allocator |
heap_allocator - heap-based allocator
Heap allocators are generally used when there is a lot of allocation and deallocation of small objects. For instance, this is often the case when dealing with std::list and std::map.
Heap-based allocator is conform to the STL specification of allocators. It does not "free" the memory until the heap is destroyed.
This allocator handles an a priori unlimited area of memory: a sequence of growing chunks are allocated. For a limited memory handler in the same spirit, see "stack_allocator"(9).
EXAMPLE
Definition at line 40 of file heap_allocator.h.
| typedef size_t rheolef::heap_allocator< T >::size_type |
Definition at line 42 of file heap_allocator.h.
| typedef std::ptrdiff_t rheolef::heap_allocator< T >::difference_type |
Definition at line 47 of file heap_allocator.h.
| typedef T* rheolef::heap_allocator< T >::pointer |
Definition at line 48 of file heap_allocator.h.
| typedef const T* rheolef::heap_allocator< T >::const_pointer |
Definition at line 49 of file heap_allocator.h.
| typedef T& rheolef::heap_allocator< T >::reference |
Definition at line 50 of file heap_allocator.h.
| typedef const T& rheolef::heap_allocator< T >::const_reference |
Definition at line 51 of file heap_allocator.h.
| typedef T rheolef::heap_allocator< T >::value_type |
Definition at line 52 of file heap_allocator.h.
|
inline |
Definition at line 55 of file heap_allocator.h.
|
inline |
Definition at line 59 of file heap_allocator.h.
|
inline |
Definition at line 65 of file heap_allocator.h.
|
inline |
Definition at line 70 of file heap_allocator.h.
|
inline |
Definition at line 81 of file heap_allocator.h.
|
inline |
Definition at line 89 of file heap_allocator.h.
|
inline |
Definition at line 90 of file heap_allocator.h.
|
inline |
Definition at line 91 of file heap_allocator.h.
|
inline |
Definition at line 95 of file heap_allocator.h.
|
inline |
Definition at line 99 of file heap_allocator.h.
|
inline |
Definition at line 101 of file heap_allocator.h.
|
inline |
Definition at line 107 of file heap_allocator.h.
|
inline |
Definition at line 111 of file heap_allocator.h.
|
inline |
Definition at line 114 of file heap_allocator.h.
|
friend |
Definition at line 121 of file heap_allocator.h.
|
protected |
Definition at line 120 of file heap_allocator.h.