![]() |
Home | Libraries | People | FAQ | More |
boost::container::private_adaptive_pool
// In header: <boost/container/adaptive_pool.hpp> template<typename T, NodesPerBlock = ADP_nodes_per_block, MaxFreeBlocks = ADP_max_free_blocks, OverheadPercent = ADP_overhead_percent, Version = > class private_adaptive_pool { public: // types typedef unsigned int ; typedef private_adaptive_pool< T, NodesPerBlock, MaxFreeBlocks, OverheadPercent BOOST_MOVE_I Version) > ; typedef sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent > ; typedef T ; typedef T * ; typedef const T * ; typedef ::T >:: ; typedef ::constT >:: ; typedef ; typedef ; typedef self_t, Version > ; // member classes/structs/unions template<typename T2> struct rebind { // types typedef private_adaptive_pool< T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent BOOST_MOVE_I Version) > ; }; // construct/copy/destruct () ; (const private_adaptive_pool &) ; template<typename T2> (const private_adaptive_pool< T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent BOOST_MOVE_I Version)> &) ; private_adaptive_pool & (const private_adaptive_pool &) ; ~(); // public member functions (Version<=); () ; (, const void * = ); void (const , ) ; (, , , ); () ; (); void (, ); void () ; void () ; void (, , ); void (const , , ); void () ; void () ; // friend functions void (private_adaptive_pool &, private_adaptive_pool &) ; bool (const private_adaptive_pool &, const private_adaptive_pool &) ; bool (const private_adaptive_pool &, const private_adaptive_pool &) ; // private member functions (, , , ); // public data members static const nodes_per_block; static const max_free_blocks; static const overhead_percent; static const real_nodes_per_block; m_pool; };
private_adaptive_pool
public
construct/copy/destruct() ;Default constructor.
(const private_adaptive_pool &) ;Copy constructor from other
private_adaptive_pool
. template<typename T2> (const private_adaptive_pool< T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent BOOST_MOVE_I Version)> &) ;Copy constructor from related
private_adaptive_pool
. private_adaptive_pool & (const private_adaptive_pool &) ;Copy assignment from other
adaptive_pool
. ~();Destructor.
private_adaptive_pool
public member functions(Version<=);
() ;
Returns the number of elements that could be allocated. Never throws
( count, const void * = );
Allocate memory for an array of count elements. Throws bad_alloc
if there is no enough memory
void (const ptr, count) ;
Deallocate allocated memory. Never throws
( command, limit_size, prefer_in_recvd_out_size, reuse);
( p) ;
Returns maximum the number of objects the previously allocated memory pointed by p can hold.
();
Allocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws bad_alloc
if there is no enough memory
void ( num_elements, chain);
Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one()
void ( p) ;
Deallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws
void ( chain) ;
void ( elem_size, n_elements, chain);
Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate()
void (const elem_sizes, n_elements, chain);
Allocates n_elements elements, each one of size elem_sizes[i] Elements must be individually deallocated with deallocate()
void ( chain) ;
void () ;Deallocates all free blocks of the pool.
private_adaptive_pool
friend functionsvoid (private_adaptive_pool &, private_adaptive_pool &) ;
Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined.
bool (const private_adaptive_pool &, const private_adaptive_pool &) ;
An allocator always compares to true, as memory allocated with one instance can be deallocated by another instance
bool (const private_adaptive_pool &, const private_adaptive_pool &) ;
An allocator always compares to false, as memory allocated with one instance can be deallocated by another instance