]> git.bts.cx Git - benzene.git/blob - src/bz/memory/allocator.h
Fixed Aseprite rendering system
[benzene.git] / src / bz / memory / allocator.h
1 #ifndef BZ_MEMORY_ALLOCATOR_H
2 #define BZ_MEMORY_ALLOCATOR_H
3
4 #include <bz/memory/arena.h>
5 #include <bz/types/common.h>
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 extern void *_bzMemoryAlloc(BZMemoryArenaID arena, size_t size, const char *filename, size_t lineNumber);
12 extern void *_bzMemoryAllocTmp(BZMemoryArenaID arena, size_t size, const char *filename, size_t lineNumber);
13
14 #define bzMemoryAlloc(arena, size) _bzMemoryAlloc(arena, size, __FILE__, __LINE__)
15 #define bzMemoryAllocTmp(arena, size) _bzMemoryAlloc(arena, size, __FILE__, __LINE__)
16
17 /* NB: We don't free. Junk the entire arena. */
18
19 #ifdef __cplusplus
20 }
21 #endif
22
23 #endif