diff options
author | Lyla B <lyla@entropy.garden> | 2020-08-14 23:37:13 -0400 |
---|---|---|
committer | Lyla B <lyla@entropy.garden> | 2020-08-14 23:37:13 -0400 |
commit | 4fd963c85035852b7b4b0407de5a89afc1874fbf (patch) | |
tree | a20a3f036a502db6b40f88654235f24ceb85eeff /README.md | |
download | arena-4fd963c85035852b7b4b0407de5a89afc1874fbf.tar.gz |
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..ac03e6f --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# arena +Minimal arena allocator for C. + +## Installation +The **arena.c** and **arena.h** files can be dropped into an existing C project +and compiled it along it. + +## Usage +- `arena_t* arena_create_sized(size_t size);`: Create an arena with size `size` + +- `arena_t* arena_create(void);`: Create an arena with a compile-time specified + page size (4096 by default) + +- `void* arena_malloc(arena_t* arena, size_t size);`: Allocate `size` bytes inside + the arena + +- `void arena_destroy(arena_t* arena);`: Destroy the arena |