aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memory.h
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-08-30 23:23:09 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-08-30 23:23:09 -0600
commit968aa6e3ed0497ea99f123c74c5fd0f3880ccc63 (patch)
tree32ac91852b82d040012d40a3f54f772723509968 /src/nvim/memory.h
parent242f75745009b3a0a2108d98ce6c02b6e13aac3f (diff)
parentf4274d0f62625683486d3912dcd6e8e45877c6a4 (diff)
downloadrneovim-968aa6e3ed0497ea99f123c74c5fd0f3880ccc63.tar.gz
rneovim-968aa6e3ed0497ea99f123c74c5fd0f3880ccc63.tar.bz2
rneovim-968aa6e3ed0497ea99f123c74c5fd0f3880ccc63.zip
Merge remote-tracking branch 'upstream/master' into userreg
Diffstat (limited to 'src/nvim/memory.h')
-rw-r--r--src/nvim/memory.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/memory.h b/src/nvim/memory.h
index 63d607c2ce..f407192331 100644
--- a/src/nvim/memory.h
+++ b/src/nvim/memory.h
@@ -6,6 +6,8 @@
#include <stdint.h> // for uint8_t
#include <time.h> // for time_t
+#include "nvim/macros.h"
+
/// `malloc()` function signature
typedef void *(*MemMalloc)(size_t);
@@ -37,6 +39,8 @@ extern MemRealloc mem_realloc;
extern bool entered_free_all_mem;
#endif
+EXTERN size_t arena_alloc_count INIT(=0);
+
typedef struct consumed_blk {
struct consumed_blk *prev;
} *ArenaMem;
@@ -48,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) \