refactor(arena): use a shared block freelist

This is both simpler in client code and more effective (always reuse
block hottest in cache)
This commit is contained in:
bfredl
2022-08-23 10:36:46 +02:00
parent c0d6052654
commit bcf5ee328e
15 changed files with 49 additions and 61 deletions

View File

@@ -52,7 +52,7 @@ typedef struct {
size_t pos, size;
} Arena;
// inits an empty arena. use arena_start() to actually allocate space!
// inits an empty arena.
#define ARENA_EMPTY { .cur_blk = NULL, .pos = 0, .size = 0 }
#define kv_fixsize_arena(a, v, s) \