std::pmr::pool_options(3)
π std::pmr::pool_options β from the C++ Standard Libary manual π
πΈ NAME πΈ
std::pmr::pool_options β yes bestie, thatβs the name, and itβs giving βoptions bag for pool resourcesβ energy. π
β¨ Synopsis β¨
Defined in header <memory_resource>
struct pool_options; (since C++17)
Okay so std::pmr::pool_options is a set of constructor options for pool resources including std::pmr::synchronized_pool_resource and std::pmr::unsynchronized_pool_resource. Not me being dramatic β that is literally what it is. π¦
π Data members π
Two members, both std::size_t, both lowkey important. Hereβs the tea:
std::size_t max_blocks_per_chunk;β the maximum number of blocks that will be allocated at once from the upstreamstd::pmr::memory_resourceto replenish the pool. If the value ofmax_blocks_per_chunkis zero or is greater than an implementation-defined limit, that limit is used instead. The implementation may choose to use a smaller value than is specified in this field and may use different values for different pools. π«Άstd::size_t largest_required_pool_block;β the largest allocation size that is required to be fulfilled using the pooling mechanism. Attempts to allocate a single block larger than this threshold will be allocated directly from the upstreamstd::pmr::memory_resource. Iflargest_required_pool_blockis zero or is greater than an implementation-defined limit, that limit is used instead. The implementation may choose a pass-through threshold larger than specified in this field. β¨
π¦ See also π¦
synchronized_pool_resource(C++17) β a thread-safestd::pmr::memory_resourcefor managing allocations in pools of different block sizes (class). π₯unsynchronized_pool_resource(C++17) β a thread-unsafestd::pmr::memory_resourcefor managing allocations in pools of different block sizes (class). π
Thatβs the whole page, bestie. Source/version: http://cppreference.com Β· date: 2024.06.10 β xoxo, your C++ bestie π
π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms