mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
fix(memory): fix memory alignment for dynamic allocation
all pointers returned by arena_alloc residing in arena block should be properly aligned to meet neovim's alignment requirements but keeping it simple settle on ARENA_ALIGN = MAX(sizeof(void *), sizeof(double)).
This commit is contained in:
@@ -45,7 +45,7 @@ typedef struct consumed_blk {
|
||||
struct consumed_blk *prev;
|
||||
} *ArenaMem;
|
||||
|
||||
#define ARENA_ALIGN sizeof(void *)
|
||||
#define ARENA_ALIGN MAX(sizeof(void *), sizeof(double))
|
||||
|
||||
typedef struct {
|
||||
char *cur_blk;
|
||||
|
Reference in New Issue
Block a user