about summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
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