We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe89a12 commit 8e99d4eCopy full SHA for 8e99d4e
1 file changed
src/storage/buffer_pool_instance.h
@@ -36,7 +36,7 @@ using ReplacerType = LRUReplacer;
36
class BufferPoolInstance {
37
private:
38
static constexpr size_t pool_size_ = BUFFER_POOL_SIZE / BUFFER_POOL_INSTANCE_SIZE; // 缓冲池大小(帧数)
39
- Page *pages_; // 缓冲池中的页面数组,连续分配
+ Page* pages_; // 缓冲池中的页面数组,连续分配
40
std::unordered_map<PageId, frame_id_t> page_table_; // 页面到帧的映射表
41
std::vector<frame_id_t> free_list_; // 空闲帧链表
42
ReplacerType replacer_; // 页面替换策略实现
@@ -49,9 +49,7 @@ class BufferPoolInstance {
49
page_table_.reserve(pool_size_ * 3); // 预留空间,避免频繁扩容
50
}
51
52
- ~BufferPoolInstance() {
53
- delete[] pages_;
54
- }
+ ~BufferPoolInstance() { delete[] pages_; }
55
56
/**
57
* @description: 将目标页面标记为脏页
0 commit comments