1
0
mirror of https://github.com/fumiama/fumidb.git synced 2026-06-08 20:10:25 +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

@@ -1,13 +1,16 @@
#ifndef _TYPE_INT8_H_
#define _TYPE_INT8_H_
#include <stdint.h>
#include "../types.h"
#define INT8_INDEX_SZ (256*8)
void* create_int8_index(int fd);
// len(buf) >= INT8_INDEX_SZ+10
void* create_int8_index(int fd, void* buf);
void* load_int8_index(int fd, uint64_t ptr);
// len(buf) >= INT8_INDEX_SZ+10
void* load_int8_index(int fd, uint64_t ptr, void* buf);
int insert_int8_item(int fd, void* index, key_t k, uint64_t ptr);