#pragma once
#include "array.h"
B2_ARRAY_DECLARE( b2StackEntry, b2StackEntry );
typedef struct b2StackAllocator
{
char* data;
int capacity;
int index;
int allocation;
int maxAllocation;
b2StackEntryArray entries;
} b2StackAllocator;
b2StackAllocator b2CreateStackAllocator( int capacity );
void b2DestroyStackAllocator( b2StackAllocator* allocator );
void* b2AllocateStackItem( b2StackAllocator* alloc, int size, const char* name );
void b2FreeStackItem( b2StackAllocator* alloc, void* mem );
void b2GrowStack( b2StackAllocator* alloc );
int b2GetStackCapacity( b2StackAllocator* alloc );
int b2GetStackAllocation( b2StackAllocator* alloc );
int b2GetMaxStackAllocation( b2StackAllocator* alloc );