#pragma once
#include "container.h"
#include <stdbool.h>
b2DeclareArray( b2StackEntry );
typedef struct b2StackEntry
{
char* data;
const char* name;
int size;
bool usedMalloc;
} b2StackEntry;
typedef struct b2Stack
{
char* data;
int capacity;
int index;
int allocation;
int maxAllocation;
b2Array( b2StackEntry ) entries;
} b2Stack;
b2Stack b2CreateStack( int capacity );
void b2DestroyStack( b2Stack* allocator );
void* b2StackAlloc( b2Stack* alloc, int size, const char* name );
void b2StackFree( b2Stack* alloc, void* mem );
void b2GrowStack( b2Stack* alloc );
int b2GetStackCapacity( b2Stack* alloc );
int b2GetStackAllocation( b2Stack* alloc );
int b2GetMaxStackAllocation( b2Stack* alloc );