cds
2.3.2
|
[type-option] Option setter for node allocator More...
#include <cds/opt/options.h>
[type-option] Option setter for node allocator
Type
is allocator with std::allocator
interface. Default is value of macro CDS_DEFAULT_ALLOCATOR that, in turn, is std::allocator
.
Many node-base containers require an allocator for maintaining data (container's node) and for internal use. Sometimes, this types of allocator should be different for performance reason. For example, we should like to allocate the node from a pool of preallocated nodes. Such pool can be seen as the node allocator.
Usually, if a container supports opt::allocator
and opt::node_allocator
options and opt::node_allocator
is not specified the opt::allocator
option is used for maintaining the nodes.
The libcds
containers actively use rebinding to convert an allocator of one type to another. Thus, you may specify any valid type as std::allocator's template parameter.