Zen C++ Libraries
Zero-dependency re-usable components for C++
Loading...
Searching...
No Matches
growing_bump_ptr_pool Class Reference

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)

Detailed Description

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.

See also
construct
bump_ptr_pool

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