diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-27 17:21:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 17:21:58 +0800 |
commit | 574d25642fc9ca65b396633aeab6e2d32778b642 (patch) | |
tree | 3ec4fa989ef32615fc48d996bdafda448c31b03f /src/nvim/memory_defs.h | |
parent | 84bbe4b0ca935db1f6202db339aee5594a3b3908 (diff) | |
download | rneovim-574d25642fc9ca65b396633aeab6e2d32778b642.tar.gz rneovim-574d25642fc9ca65b396633aeab6e2d32778b642.tar.bz2 rneovim-574d25642fc9ca65b396633aeab6e2d32778b642.zip |
refactor: move Arena and ArenaMem to memory_defs.h (#26240)
Diffstat (limited to 'src/nvim/memory_defs.h')
-rw-r--r-- | src/nvim/memory_defs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/memory_defs.h b/src/nvim/memory_defs.h new file mode 100644 index 0000000000..bde0e54f54 --- /dev/null +++ b/src/nvim/memory_defs.h @@ -0,0 +1,15 @@ +#pragma once + +#include <stddef.h> + +typedef struct consumed_blk { + struct consumed_blk *prev; +} *ArenaMem; + +typedef struct { + char *cur_blk; + size_t pos, size; +} Arena; + +// inits an empty arena. +#define ARENA_EMPTY { .cur_blk = NULL, .pos = 0, .size = 0 } |