Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::pmr::pool_options

      From cppreference.com
      <cpp‎ |memory
       
       
      Memory management library
      (exposition only*)
      Allocators
      Uninitialized memory algorithms
      Constrained uninitialized memory algorithms
      Memory resources
      Uninitialized storage(until C++20)
      (until C++20*)
      (until C++20*)
      Garbage collector support(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
       
      Defined in header<memory_resource>
      struct pool_options;
      (since C++17)

      std::pmr::pool_options is a set of constructor options for pool resources includingstd::pmr::synchronized_pool_resource andstd::pmr::unsynchronized_pool_resource.

      [edit]Data members

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


      [edit]See also

      a thread-safestd::pmr::memory_resource for managing allocations in pools of different block sizes
      (class)[edit]
      a thread-unsafestd::pmr::memory_resource for managing allocations in pools of different block sizes
      (class)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/memory/pool_options&oldid=139751"

      [8]ページ先頭

      ©2009-2025 Movatter.jp