cds  2.3.2
cds::opt::node_allocator< Type > Struct Template Reference

[type-option] Option setter for node allocator More...

#include <cds/opt/options.h>

Detailed Description

template<typename Type>
struct cds::opt::node_allocator< Type >

[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.


The documentation for this struct was generated from the following file:

cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:50 by Doxygen 1.8.13