neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

memory_defs.h (289B)


      1 #pragma once
      2 
      3 #include <stddef.h>
      4 
      5 typedef struct consumed_blk {
      6  struct consumed_blk *prev;
      7 } *ArenaMem;
      8 
      9 typedef struct {
     10  char *cur_blk;
     11  size_t pos, size;
     12 } Arena;
     13 
     14 #define ARENA_BLOCK_SIZE 4096
     15 
     16 // inits an empty arena.
     17 #define ARENA_EMPTY { .cur_blk = NULL, .pos = 0, .size = 0 }