1 | #include "duckdb/storage/block.hpp" |
2 | #include "duckdb/common/assert.hpp" |
3 | |
4 | namespace duckdb { |
5 | |
6 | Block::Block(Allocator &allocator, block_id_t id) |
7 | : FileBuffer(allocator, FileBufferType::BLOCK, Storage::BLOCK_SIZE), id(id) { |
8 | } |
9 | |
10 | Block::Block(Allocator &allocator, block_id_t id, uint32_t internal_size) |
11 | : FileBuffer(allocator, FileBufferType::BLOCK, internal_size), id(id) { |
12 | D_ASSERT((AllocSize() & (Storage::SECTOR_SIZE - 1)) == 0); |
13 | } |
14 | |
15 | Block::Block(FileBuffer &source, block_id_t id) : FileBuffer(source, FileBufferType::BLOCK), id(id) { |
16 | D_ASSERT((AllocSize() & (Storage::SECTOR_SIZE - 1)) == 0); |
17 | } |
18 | |
19 | } // namespace duckdb |
20 | |