perf(api): allow to use an arena for return values

This commit is contained in:
bfredl
2022-08-23 09:33:08 +02:00
parent baaaa1f2b3
commit c0d6052654
36 changed files with 584 additions and 497 deletions

View File

@@ -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;