blob: 626e294ede617802e8139a10861b8806daa17c49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef TINY_CONVMEM_BASE_ALLOCATOR_H
#define TINY_CONVMEM_BASE_ALLOCATOR_H
#include <stddef.h>
void *tiny_alloc(size_t size);
void *tiny_calloc(size_t count, size_t size);
void *tiny_realloc(void *memory, size_t size);
void tiny_free(void *memory);
void tiny_allocator_reset(void);
void tiny_allocator_fail_after(size_t allocation_index);
size_t tiny_allocator_call_count(void);
size_t tiny_allocator_outstanding(void);
#ifndef TINY_ALLOCATOR_IMPLEMENTATION
#define malloc tiny_alloc
#define calloc tiny_calloc
#define realloc tiny_realloc
#define free tiny_free
#endif
#endif
|