]>
git.bts.cx Git - benzene.git/blob - src/bz/memory/allocator.h
1 #ifndef BZ_MEMORY_ALLOCATOR_H
2 #define BZ_MEMORY_ALLOCATOR_H
4 #include <bz/memory/arena.h>
5 #include <bz/types/common.h>
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
);
14 #define bzMemoryAlloc(arena, size) _bzMemoryAlloc(arena, size, __FILE__, __LINE__)
15 #define bzMemoryAllocTmp(arena, size) _bzMemoryAlloc(arena, size, __FILE__, __LINE__)
17 /* NB: We don't free. Junk the entire arena. */