![]() |
Zen C++ Libraries
Zero-dependency re-usable components for C++
|
A growing collection of memory chunks for storing variable-width objects which get destroyed all at once. More...
#include <bump_ptr_pool.hpp>
Public Member Functions | |
| growing_bump_ptr_pool (std::size_t min_size=ZEN_DEFAULT_GROWING_BUMP_PTR_POOL_MIN_SIZE) | |
| growing_bump_ptr_pool (growing_bump_ptr_pool &&other) | |
| void * | allocate (std::size_t sz, std::size_t alignment, destroy_fn destroy) |
A growing collection of memory chunks for storing variable-width objects which get destroyed all at once.
This pool keeps allocating memory using a given pool until it is full, at which point another pool will be created.
The pools managed by this pool grow exponentially. That is, when allocating a new pool the size of the new pool will be at least double that of the old pool.