std::experi...ool_options(3)
π¦ NAME π¦
std::experimental::pmr::pool_options β okay so it's literally just std::experimental::pmr::pool_options. That's the whole name bestie, no cap. π
β¨ Synopsis β¨
Defined in header <experimental/memory_resource>:
struct pool_options {
std::size_t max_blocks_per_chunk = 0; (library fundamentals TS)
std::size_t largest_required_pool_block = 0;
};
So this struct, std::experimental::pmr::pool_options, contains a set of constructor options for std::experimental::pmr::synchronized_pool_resource and std::experimental::pmr::unsynchronized_pool_resource. It's giving "options bag you hand to your pool resource's constructor" energy and honestly? Obsessed. π«Ά
π Data members π
std::size_t max_blocks_per_chunkβ the maximum number of blocks that will be allocated at once from the upstream memory resource to replenish a pool (public member object). Lowkey the "how many blocks do we grab in one haul" knob. πstd::size_t largest_required_pool_blockβ the largest allocation size that is required to be fulfilled through the pooling mechanism (public member object). Anything bigger than this doesn't go through the pool, periodt. π₯
β οΈ Bestie, listen: if the value of max_blocks_per_chunk is zero or greater than an implementation-defined limit, that limit is used instead. The implementation may use a smaller value than is specified and may use different values for different pools. So like... it's a vibe, not a promise. π
Also, if the value of largest_required_pool_block is zero or greater than an implementation-defined limit, that limit is used instead. The implementation may use a threshold greater than specified in this field. So don't come for your implementation when it does its own thing, it's literally allowed to. π
πΈ See also πΈ
synchronized_pool_resourceβ a thread-safememory_resourcefor managing allocations in pools of different block sizes (class). The extroverted one. Slay. πunsynchronized_pool_resourceβ a thread-unsafememory_resourcefor managing allocations in pools of different block sizes (class). Introvert version, still iconic. π§
π Category π
- Noindexed pages
That's the whole thing, bestie β go forth and pool responsibly. π This lil page dropped straight from cppreference.com, version 2024.06.10, and it's been a pleasure serving you. Mwah! πβ¨
π¦ 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