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 | 5 月前3Apache Pulsar,云原生时代的消息平台 - 翟佳
Subscription2 Consumer 1 2 3 4 5 6 7 readEntries Ack/N-Ack Broke BookKeepe 1 2 3 4 5 6 7 Ledger stores Data A B C D E Ledger stores Cursor changes Curso Subscription1 … Write Ack ManagedLedger + -/+ streamnative0 码力 | 39 页 | 12.71 MB | 6 月前0.03
共 2 条
- 1