O2 2.0
A communication protocol for interactive music and media applications.
o2mem.h
1/* o2mem.h -- real-time allocation, non-blocking queues
2 *
3 * Roger B. Dannenberg
4 * April 2020
5 */
6
7/* Free memory will consist of a bunch of free lists organized by size.
8 Allocate by removing from head of list. Free by pushing back on list.
9
10 If a list is empty, add to it from a large block of memory.
11
12 To support larger object sizes, there are two free lists: a linear
13 list with blocks in increments of 8, and an exponential list with
14 block sizes that are powers of 2.
15
16 The linear list block sizes go up to MAX_LINEAR_BYTES.
17 */
18
19#define O2MEM_H
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25
26void o2_mem_init(char *first_chunk, int64_t size);
27
28#ifdef __cplusplus
29}
30#endif
31