19 explicit BufferBlock(std::unique_ptr<storage::MemoryBuffer> block);
27 std::unique_ptr<storage::MemoryBuffer>
block;
36 : memoryManager{memoryManager}, currentBlock{nullptr} {};
41 move(begin(other.blocks), end(other.blocks), back_inserter(blocks));
47 currentBlock = other.currentBlock;
56 bool requireNewBlock(uint64_t sizeToAllocate) {
57 return currentBlock ==
nullptr ||
61 void allocateNewBlock(uint64_t size);
64 std::vector<std::unique_ptr<BufferBlock>> blocks;
65 storage::MemoryManager* memoryManager;
#define KUZU_API
Definition api.h:25
Definition in_mem_overflow_buffer.h:32
void merge(InMemOverflowBuffer &other)
Definition in_mem_overflow_buffer.h:40
uint8_t * allocateSpace(uint64_t size)
InMemOverflowBuffer(storage::MemoryManager *memoryManager)
Definition in_mem_overflow_buffer.h:35
Definition array_utils.h:7
Definition in_mem_overflow_buffer.h:17
uint64_t currentOffset
Definition in_mem_overflow_buffer.h:26
std::unique_ptr< storage::MemoryBuffer > block
Definition in_mem_overflow_buffer.h:27
void resetCurrentOffset()
Definition in_mem_overflow_buffer.h:29
BufferBlock(std::unique_ptr< storage::MemoryBuffer > block)