1
0
mirror of https://github.com/fumiama/fumidb.git synced 2026-06-12 22:40:29 +08:00

add types

This commit is contained in:
源文雨
2022-05-01 21:16:17 +08:00
parent eda10fba91
commit 67b9176615
17 changed files with 310 additions and 26 deletions

View File

@@ -16,6 +16,12 @@
// page 指针
void* alloc_page(int fd);
// 获取 ptr 处的页
// 返回:
// NULL 错误,参见 errno
// page 指针
void* get_page(int fd, uint64_t ptr);
// 刷新一页
// 返回:
// EOF lseek 错误,参见 errno
@@ -44,6 +50,12 @@ int free_page(int fd, void* page);
// blk 指针
void* alloc_block(int fd, uint16_t size);
// 获取 ptr 处的块
// 返回:
// NULL 错误,参见 errno
// blk 指针
void* get_block(int fd, uint16_t size, uint64_t ptr);
// 刷新 block 到文件
// 返回:
// EOF lseek 错误或 size 过大,参见 errno