std::experi...ool_options(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ¦‹ 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-safe memory_resource for managing allocations in pools of different block sizes (class). The extroverted one. Slay. πŸ‘‘
  • unsynchronized_pool_resource β€” a thread-unsafe memory_resource for 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