Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 901 Bytes

mixed_pool.rst

File metadata and controls

21 lines (16 loc) · 901 Bytes

Mixed Pool Creation and Algorithm Basics

This recipe shows how to create a default mixed pool, and one that might be tailored to a specific application's needs. Mixed pools allocate in an array of umpire::strategy::FixedPool for small allocations, because these have simpler bookkeeping and are very fast, and a umpire::strategy::DynamicPool for larger allocations.

The class umpire::strategy::MixedPool uses a generic choice of umpire::strategy::FixedPool of size 256 bytes to 4MB in increments of powers of 2, while umpire::strategy::MixedPoolImpl has template arguments that select the first, power of 2 increment, and last fixed pool size.

The complete example is included below:

../../../examples/cookbook/recipe_mixed_pool.cpp