From 4fd963c85035852b7b4b0407de5a89afc1874fbf Mon Sep 17 00:00:00 2001 From: Lyla B Date: Fri, 14 Aug 2020 23:37:13 -0400 Subject: Initial commit. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 README.md (limited to 'README.md') 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 -- cgit 1.4.1-2-gfad0