12 #include "lockfreenode.h" 17 template <
typename T,
class TMemInterface >
22 typedef std::vector< node_type, stl_allocator< T, TMemInterface > > node_vector;
30 array.reserve(_start_count);
31 while (_start_count--)
33 dispenser.push_front(&array[_start_count]);
46 node = dispenser.pop_front();
51 inline node_type *new_node()
53 node_type *ret = dispenser.pop_front();
58 ret =
new node_type();
62 ts_print(
"Insufficient number of pre-allocated Nodes");
66 ts_debug_only(ret->next.node =
nullptr;);
70 inline void free_node(node_type *_node)
72 assert(_node->next.node ==
nullptr);
73 dispenser.push_front(_node);
Class stl_allocator.
Definition: allocator.h:16
Definition: lockfreenodestack.h:15
Definition: lockfreenodedispenser.h:18
Definition: lockfreenode.h:24