|
Honeycomb
0.1
Component-Model Framework
|
Lock-free freelist, allocates re-usable objects and provides automatic storage expansion for concurrent algorithms. More...
#include <Pool.h>


Public Types | |
| typedef T | value_type |
| typedef MemPool::Bucket::Handle | Handle |
| typedef MemPool::Bucket::TaggedHandle | TaggedHandle |
Public Member Functions | |
| FreeList (szt capacity=0) | |
| void | reserve (szt capacity) |
| Ensure that enough storage is allocated for a number of objects. More... | |
| szt | capacity () const |
| The number of objects for which storage is allocated. More... | |
| T * | alloc () |
| Remove object from free list without constructing it. More... | |
| template<class... Args> | |
| T * | construct (Args &&...args) |
| Construct object and remove from free list. More... | |
| void | free (T *ptr) |
| Add object to free list without destroying it. More... | |
| void | destroy (T *ptr) |
| Destroy object and add to free list. More... | |
| Handle | handle (T *ptr) const |
| Get compressed handle for object. More... | |
| T * | deref (Handle handle) const |
| Get object from compressed handle. More... | |
Friends | |
| template<class > | |
| class | FreeListAllocator |
Lock-free freelist, allocates re-usable objects and provides automatic storage expansion for concurrent algorithms.
Memory is only reclaimed upon destruction.
| typedef MemPool::Bucket::Handle honey::lockfree::FreeList< T >::Handle |
| typedef MemPool::Bucket::TaggedHandle honey::lockfree::FreeList< T >::TaggedHandle |
| typedef T honey::lockfree::FreeList< T >::value_type |
|
inline |
|
inline |
Remove object from free list without constructing it.
|
inline |
The number of objects for which storage is allocated.
|
inline |
Construct object and remove from free list.
|
inline |
Get object from compressed handle.
|
inline |
Destroy object and add to free list.
|
inline |
Add object to free list without destroying it.
|
inline |
Get compressed handle for object.
|
inline |
Ensure that enough storage is allocated for a number of objects.
1.8.10