| 643 | std::vector<std::unique_ptr<ElasticPool>> g_pools; |
| 644 | |
| 645 | int64_t pool_chunks(const ElasticPool& p, size_t a, int64_t slots) { |
| 646 | const uint64_t G = strata::core::vmm_granularity(); |
| 647 | return (int64_t) (((uint64_t) slots * p.per_slot[a] + G - 1) / G); |
| 648 | } |
| 649 | int64_t pool_slots(const ElasticPool& p, int64_t cells) { |
| 650 | return std::min<int64_t>(p.n_slots, std::max<int64_t>((cells + p.page_size - 1) / p.page_size, 1)); |
| 651 | } |
no test coverage detected