1
0
mirror of https://github.com/fumiama/fumidb.git synced 2026-06-09 20:50:38 +08:00

优化内存分配

This commit is contained in:
源文雨
2022-05-02 12:36:56 +08:00
parent 0196070fe0
commit e24f761f34
9 changed files with 129 additions and 105 deletions

View File

@@ -23,11 +23,11 @@ typedef uint64_t key_t;
// 为类型 type 创建索引
// 返回:索引头节点的指针 index
void* create_index(int fd, type_t t);
void* create_index(int fd, type_t t, void* buf);
// 加载类型 type 的索引
// 返回:索引头节点的指针 index
void* load_index(int fd, type_t t, uint64_t ptr);
void* load_index(int fd, type_t t, uint64_t ptr, void* buf);
// 插入一条索引
int insert_item(int fd, type_t t, void* index, key_t k, uint64_t ptr);