about summary refs log blame commit diff stats
path: root/README.md
blob: ac03e6f1a3716650a7f0aa115b7e3a98af4af219 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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