about summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
authorLyla B <lyla@entropy.garden>2020-08-14 23:37:13 -0400
committerLyla B <lyla@entropy.garden>2020-08-14 23:37:13 -0400
commit4fd963c85035852b7b4b0407de5a89afc1874fbf (patch)
treea20a3f036a502db6b40f88654235f24ceb85eeff /README.md
downloadarena-4fd963c85035852b7b4b0407de5a89afc1874fbf.tar.gz
Initial commit. HEAD master
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
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