#include <SlotAllocator.h>
Public Member Functions | |
| T * | Allocate () |
| void | Free (std::vector< T * > &chunk) |
| void | Free (T *t) |
| void | Purge () |
| ~SlotAllocator () | |
Static Public Member Functions | |
| SlotAllocator< T > & | GetSlotAllocator () |
Protected Attributes | |
| TLS< std::vector< T * > > | data |
| TLS< std::vector< T * > > | free_list |
| TLS< unsigned > | n_elems |
| number of T in the most recently allocated block | |
| TLS< unsigned > | tail_free |
Private Member Functions | |
| SlotAllocator & | operator= (SlotAllocator &sa) |
| SlotAllocator (SlotAllocator &sa) | |
| SlotAllocator () | |
Each time all slots are full it allocates twice the previous allocation. If it is unable to allocate twice the previous allocation, it does a binary 'search' for the largest amount of memory it can allocate. The current implementation does not allow memory to be freed once allocated.
Definition at line 39 of file SlotAllocator.h.
|
|||||||||
|
Definition at line 45 of file SlotAllocator.h. |
|
|||||||||
|
Definition at line 72 of file SlotAllocator.h. |
|
||||||||||
|
Definition at line 74 of file SlotAllocator.h. |
|
|||||||||
|
Definition at line 88 of file SlotAllocator.h. References mems::SlotAllocator< T >::free_list, mems::SlotAllocator< T >::n_elems, mems::POOL_GROWTH_RATE, and mems::SlotAllocator< T >::tail_free. |
|
||||||||||
|
Definition at line 152 of file SlotAllocator.h. References mems::SlotAllocator< T >::free_list. |
|
||||||||||
|
Definition at line 135 of file SlotAllocator.h. References mems::SlotAllocator< T >::free_list. |
|
|||||||||
|
Definition at line 80 of file SlotAllocator.h. |
|
||||||||||
|
Definition at line 73 of file SlotAllocator.h. |
|
|||||||||
|
Definition at line 48 of file SlotAllocator.h. Referenced by mems::SlotAllocator< MatchHashEntry >::~SlotAllocator(). |
|
|||||
|
Definition at line 65 of file SlotAllocator.h. Referenced by mems::SlotAllocator< MatchHashEntry >::operator=(). |
|
|||||
|
Definition at line 69 of file SlotAllocator.h. Referenced by mems::SlotAllocator< T >::Allocate(), and mems::SlotAllocator< T >::Free(). |
|
|||||
|
number of T in the most recently allocated block
Definition at line 67 of file SlotAllocator.h. Referenced by mems::SlotAllocator< T >::Allocate(), and mems::SlotAllocator< MatchHashEntry >::operator=(). |
|
|||||
|
Definition at line 66 of file SlotAllocator.h. Referenced by mems::SlotAllocator< T >::Allocate(), and mems::SlotAllocator< MatchHashEntry >::operator=(). |
1.3.6