aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memory.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-27 17:21:58 +0800
committerGitHub <noreply@github.com>2023-11-27 17:21:58 +0800
commit574d25642fc9ca65b396633aeab6e2d32778b642 (patch)
tree3ec4fa989ef32615fc48d996bdafda448c31b03f /src/nvim/memory.c
parent84bbe4b0ca935db1f6202db339aee5594a3b3908 (diff)
downloadrneovim-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.c')
-rw-r--r--src/nvim/memory.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c
index 732c9ca39d..eee8e25086 100644
--- a/src/nvim/memory.c
+++ b/src/nvim/memory.c
@@ -577,7 +577,9 @@ void alloc_block(Arena *arena)
static size_t arena_align_offset(uint64_t off)
{
+#define ARENA_ALIGN MAX(sizeof(void *), sizeof(double))
return ((off + (ARENA_ALIGN - 1)) & ~(ARENA_ALIGN - 1));
+#undef ARENA_ALIGN
}
/// @param arena if NULL, do a global allocation. caller must then free the value!