1 #ifndef BZ_MEMORY_STADIUM_INTERNAL_H
2 #define BZ_MEMORY_STADIUM_INTERNAL_H
4 #include <bz/memory/arena.h>
6 #include <bz/types/identifier.h>
12 #define MAX_WATERMARKS 16
14 struct BZMemoryArena
{
15 char *identifier
[kBZMaxIdentifierLength
];
21 size_t allocationOffsetBottom
;
22 size_t allocationOffsetTop
;
25 size_t watermarks
[MAX_WATERMARKS
];
28 extern BZMemoryArenaID
bzMemoryArenaSetup(BZMemoryArena
*arenaOut
, void *memory
, size_t size
, bool zeroOut
);
29 extern BZMemoryArenaID
bzMemoryArenaAllocate(BZMemoryArena
*arenaOut
, BZMemoryArenaID arenaFrom
, size_t size
);
31 //extern void bzMemoryFree(void *p);
33 extern void *bzSystemAllocate(size_t size
);
34 extern void *bzSystemAllocateStack(size_t size
);