Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2022. The current version is 1.89.0.
An allocator that caches memory blocks in thread-local storage for reuse.
template< typename T> class recycling_allocator
|
Name |
Description |
|---|---|
|
Rebind the allocator to another value_type. |
|
|
The type of object allocated by the recycling allocator. |
|
Name |
Description |
|---|---|
|
Allocate memory for the specified number of values. |
|
|
Deallocate memory for the specified number of values. |
|
|
Inequality operator. Always returns false. |
|
|
Equality operator. Always returns true. |
|
|
recycling_allocator [constructor] |
Default constructor. |
The uses a simple strategy where a limited number of small memory blocks
are cached in thread-local storage, if the current thread is running an
io_context or is part of
a thread_pool.
Header: boost/asio/recycling_allocator.hpp
Convenience header: boost/asio.hpp