Practical memory pool based allocators for Modern C++blocks in the ledger and returns the first block’s index or BlockCount on failure std::size_t find_contiguous_blocks(std::size_t n) const noexcept; // Marks n blocks in the ledger as “in-use” starting void set_blocks_in_use(std::size_t index, std::size_t n) noexcept; // Marks n blocks in the ledger as “free” starting at ‘index’ void set_blocks_free(std::size_t index, std::size_t n) noexcept; m_data{nullptr}; // Reserves one bit per block to indicate whether it is in-use std::byte* m_ledger{nullptr}; }; © 2020 Apex.AI, Inc.Construction/Destruction bucket::bucket(std::size_t block_size0 码力 | 49 页 | 986.95 KB | 6 月前3
共 1 条
- 1













