| 280 | int unsynchronized_pool_resource::__log2_pool_block_size(int i) const { return (i + __log2_smallest_block_size); } |
| 281 | |
| 282 | int unsynchronized_pool_resource::__pool_index(size_t bytes, size_t align) const { |
| 283 | if (align > alignof(std::max_align_t) || bytes > (size_t(1) << __num_fixed_pools_)) |
| 284 | return __num_fixed_pools_; |
| 285 | else { |
| 286 | int i = 0; |
| 287 | bytes = (bytes > align) ? bytes : align; |
| 288 | bytes -= 1; |
| 289 | bytes >>= __log2_smallest_block_size; |
| 290 | while (bytes != 0) { |
| 291 | bytes >>= 1; |
| 292 | i += 1; |
| 293 | } |
| 294 | return i; |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | unsynchronized_pool_resource::unsynchronized_pool_resource(const pool_options& opts, memory_resource* upstream) |
| 299 | : __res_(upstream), __fixed_pools_(nullptr) { |
nothing calls this directly
no outgoing calls
no test coverage detected