Skip to content

Commit 8e99d4e

Browse files
Lin-jingygithub-actions[bot]
authored andcommitted
style: format code with clang-format
1 parent fe89a12 commit 8e99d4e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/storage/buffer_pool_instance.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ using ReplacerType = LRUReplacer;
3636
class BufferPoolInstance {
3737
private:
3838
static constexpr size_t pool_size_ = BUFFER_POOL_SIZE / BUFFER_POOL_INSTANCE_SIZE; // 缓冲池大小(帧数)
39-
Page *pages_; // 缓冲池中的页面数组,连续分配
39+
Page* pages_; // 缓冲池中的页面数组,连续分配
4040
std::unordered_map<PageId, frame_id_t> page_table_; // 页面到帧的映射表
4141
std::vector<frame_id_t> free_list_; // 空闲帧链表
4242
ReplacerType replacer_; // 页面替换策略实现
@@ -49,9 +49,7 @@ class BufferPoolInstance {
4949
page_table_.reserve(pool_size_ * 3); // 预留空间,避免频繁扩容
5050
}
5151

52-
~BufferPoolInstance() {
53-
delete[] pages_;
54-
}
52+
~BufferPoolInstance() { delete[] pages_; }
5553

5654
/**
5755
* @description: 将目标页面标记为脏页

0 commit comments

Comments
 (0)