首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::pmr::pool_options

Defined in header <memory_resource>

struct pool_options;

(since C++17)

std::pmr::pool_options是池资源的一组构造函数选项,包括std::pmr::synchronized_pool_resourcestd::pmr::unsynchronized_pool_resource...

数据成员

Member

Meaning

std::size_t max_blocks_per_chunk;

std::size_t max_blocks_per_chunk;

The maximum number of blocks that will be allocated at once from the upstream std::pmr::memory_resource to replenish the pool. If the value of max_blocks_per_chunk is 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 max_blocks_per_chunk;

std::size_t largest_required_pool_block;

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 upstream std::pmr::memory_resource. If largest_required_pool_block is 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.

std::size_t largest_required_pool_block;

另见

synchronized_pool_resource (C++17)

a thread-safe std::pmr::memory_resource for managing allocations in pools of different block sizes (class)

unsynchronized_pool_resource (C++17)

a thread-unsafe std::pmr::memory_resource for managing allocations in pools of different block sizes (class)

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券