replaced illegal STL
This commit is contained in:
@ -1,12 +1,9 @@
|
||||
#ifndef BPT_HPP
|
||||
#define BPT_HPP
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <queue>
|
||||
#include <shared_mutex>
|
||||
#include <vector>
|
||||
#include "vector.hpp"
|
||||
#include "bpt/bpt_page.hpp"
|
||||
#include "bpt/buffer_pool_manager.h"
|
||||
#include "bpt/config.h"
|
||||
@ -25,7 +22,7 @@ class BPlusTreeIndexer {
|
||||
|
||||
private:
|
||||
struct PositionSignType {
|
||||
std::vector<std::pair<BasicPageGuard, in_page_key_count_t>> path;
|
||||
sjtu::vector<std::pair<BasicPageGuard, in_page_key_count_t>> path;
|
||||
bool is_end{false};
|
||||
};
|
||||
PositionSignType FindPosition(const KeyType &key) { // Finish Design
|
||||
|
@ -1,11 +1,11 @@
|
||||
#ifndef BUFFER_POOL_MANAGER_H
|
||||
#define BUFFER_POOL_MANAGER_H
|
||||
#include <cstddef>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
#include <unordered_map>
|
||||
#include "map.hpp"
|
||||
#include "list.hpp"
|
||||
#include "bpt/config.h"
|
||||
#include "bpt/disk_manager.h"
|
||||
#include "bpt/replacer.h"
|
||||
@ -395,7 +395,7 @@ class BufferPoolManager {
|
||||
std::mutex latch;
|
||||
#endif
|
||||
Page *pages_;
|
||||
std::unordered_map<page_id_t, frame_id_t> page_table_;
|
||||
std::list<frame_id_t> free_list_;
|
||||
sjtu::map<page_id_t, frame_id_t> page_table_;
|
||||
sjtu::list<frame_id_t> free_list_;
|
||||
};
|
||||
#endif
|
@ -102,7 +102,7 @@ BufferPoolManager::BufferPoolManager(size_t pool_size, size_t replacer_k, DiskMa
|
||||
|
||||
// Initially, every page is in the free list.
|
||||
for (size_t i = 0; i < pool_size; ++i) {
|
||||
free_list_.emplace_back(static_cast<int>(i));
|
||||
free_list_.push_back(static_cast<frame_id_t>(i));
|
||||
}
|
||||
}
|
||||
BufferPoolManager::~BufferPoolManager() {
|
||||
|
Reference in New Issue
Block a user