mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00

Work towards getting rid of libmsgpack depedency eventually. msgpack_sbuffer is just a string buffer, we can use our own String type.
18 lines
289 B
C
18 lines
289 B
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
|
|
typedef struct consumed_blk {
|
|
struct consumed_blk *prev;
|
|
} *ArenaMem;
|
|
|
|
typedef struct {
|
|
char *cur_blk;
|
|
size_t pos, size;
|
|
} Arena;
|
|
|
|
#define ARENA_BLOCK_SIZE 4096
|
|
|
|
// inits an empty arena.
|
|
#define ARENA_EMPTY { .cur_blk = NULL, .pos = 0, .size = 0 }
|