Move header files to include/

This commit is contained in:
olemorud
2023-06-02 18:06:27 +02:00
committed by Ole Morud
parent 529955dbfb
commit 51feaf1d00
4 changed files with 2 additions and 1 deletions

9
include/alloc_backend.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef ALLOC_BACKEND_H
#define ALLOC_BACKEND_H
#include <stddef.h>
void* call_alloc_backend(size_t size);
#endif

17
include/arena.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef ARENA_H
#define ARENA_H
#include <stddef.h> // ptrdiff_t
typedef struct arena {
void *begin,
*next;
size_t cap;
} __attribute__((aligned(sizeof(void*)))) arena_t;
arena_t* arena_new();
void arena_reset(arena_t* a);
void* arena_alloc(arena_t* a, size_t len);
#endif