1 //////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/libs/container for documentation.
9 //////////////////////////////////////////////////////////////////////////////
11 #ifndef BOOST_CONTAINER_PMR_POOL_OPTIONS_HPP
12 #define BOOST_CONTAINER_PMR_POOL_OPTIONS_HPP
14 #if defined (_MSC_VER)
24 //! The members of pool_options comprise a set of constructor options for pool resources.
25 //! The effect of each option on the pool resource behavior is described below:
27 //! - `std::size_t max_blocks_per_chunk`: The maximum number of blocks that will be allocated
28 //! at once from the upstream memory resource to replenish a pool. If the value of
29 //! `max_blocks_per_chunk` is zero or is greater than an implementation-defined limit,
30 //! that limit is used instead. The implementation may choose to use a smaller value
31 //! than is specified in this field and may use different values for different pools.
33 //! - `std::size_t largest_required_pool_block`: The largest allocation size that is required
34 //! to be fulfilled using the pooling mechanism. Attempts to allocate a single block
35 //! larger than this threshold will be allocated directly from the upstream memory
36 //! resource. If largest_required_pool_block is zero or is greater than an
37 //! implementation-defined limit, that limit is used instead. The implementation may
38 //! choose a pass-through threshold larger than specified in this field.
42 : max_blocks_per_chunk(0u), largest_required_pool_block(0u)
44 std::size_t max_blocks_per_chunk;
45 std::size_t largest_required_pool_block;
49 } //namespace container {
52 #endif //BOOST_CONTAINER_PMR_POOL_OPTIONS_HPP