| 120 | | typedef typename detail::select_freelist<node, node_allocator, compile_time_sized, fixed_sized, capacity>::type pool_t; |
| | 120 | |
| | 121 | struct initialised_node_allocator : node_allocator |
| | 122 | { |
| | 123 | initialised_node_allocator() |
| | 124 | { |
| | 125 | } |
| | 126 | |
| | 127 | initialised_node_allocator( const node_allocator& a ) : |
| | 128 | node_allocator(a) |
| | 129 | { |
| | 130 | } |
| | 131 | |
| | 132 | typename node_allocator::pointer allocate( |
| | 133 | typename node_allocator::size_type n, |
| | 134 | typename node_allocator::const_pointer hint=0 ) |
| | 135 | { |
| | 136 | typename node_allocator::pointer p = node_allocator::allocate(n,hint); |
| | 137 | memset(p,0,sizeof(*p)*n); |
| | 138 | return p; |
| | 139 | } |
| | 140 | }; |
| | 141 | |
| | 142 | typedef typename detail::select_freelist<node, initialised_node_allocator, compile_time_sized, fixed_sized, capacity>::type pool_t; |