When the pool gets too big, switch to just the file, not memory

This commit is contained in:
Erica Fischer
2023-01-17 11:04:26 -08:00
parent 2695db5ebf
commit 1ef0f260f1
4 changed files with 116 additions and 21 deletions
+4
View File
@@ -3,15 +3,19 @@
#include <atomic>
#include <string>
#include "errors.hpp"
struct memfile {
int fd = 0;
std::string map;
unsigned long tree = 0;
FILE *fp = NULL;
size_t off = 0;
};
struct memfile *memfile_open(int fd);
int memfile_close(struct memfile *file);
int memfile_write(struct memfile *file, void *s, long long len);
void memfile_full(struct memfile *file);
#endif