1 #ifndef BZ_MEMORY_STADIUM_INTERNAL_H
2 #define BZ_MEMORY_STADIUM_INTERNAL_H
4 #include <bz/memory/arena.h>
10 #define MAX_WATERMARKS 16
12 struct BZMemoryArena
{
17 size_t allocationOffsetBottom
;
18 size_t allocationOffsetTop
;
21 size_t watermarks
[MAX_WATERMARKS
];
24 extern BZMemoryArenaID
bzMemoryArenaSetup(BZMemoryArena
*arenaOut
, void *memory
, size_t size
, bool zeroOut
);
25 extern BZMemoryArenaID
bzMemoryArenaAllocate(BZMemoryArena
*arenaOut
, BZMemoryArenaID arenaFrom
, size_t size
);
27 //extern void bzMemoryFree(void *p);
29 extern void *bzSystemAllocate(size_t size
);
30 extern void *bzSystemAllocateStack(size_t size
);