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

std::pmr::monotonic_buffer_resource::monotonic_buffer_resource

monotonic_buffer_resource();

(1)

(since C++17)

explicit monotonic_buffer_resource(std::pmr::memory_resource* upstream);

(2)

(since C++17)

explicit monotonic_buffer_resource(std::size_t initial_size);

(3)

(since C++17)

monotonic_buffer_resource(std::size_t initial_size, std::pmr::memory_resource* upstream);

(4)

(since C++17)

monotonic_buffer_resource(void* buffer, std::size_t buffer_size);

(5)

(since C++17)

monotonic_buffer_resource(void* buffer, std::size_t buffer_size, std::pmr::memory_resource* upstream);

(6)

(since C++17)

monotonic_buffer_resource(const monotonic_buffer_resource&) = delete;

(7)

(since C++17)

构造一个monotonic_buffer_resource不接受上游内存资源指针的构造函数使用std::pmr::get_default_resource作为上游内存资源。

1-2%29设置电流缓冲器若为空,则为下一缓冲区大小到实现定义的大小。

3-4%29电流缓冲器若为空,则为下一缓冲区大小大小不小于initial_size...

5-6%29电流缓冲器buffer下一缓冲区大小buffer_size%28但不少于1%29。然后增加下一缓冲区大小通过实现定义的增长因子%28,它不必是整数%29。

7%29复制构造函数被删除。

参数

upstream

-

the upstream memory resource to use; must point to a valid memory resource

initial_size

-

the minimum size of the first buffer to allocate; must be greater than zero

buffer

-

the initial buffer to use

buffer_size

-

the size of the initial buffer; cannot be greater than the number of bytes in buffer

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com