
internal void
arena_init(Arena *arena, u8 *backing_buffer, i32 size)
{
  arena->backing_buffer = backing_buffer;
  arena->offset = 0;
  arena->size = size;
}

internal void *
arena_alloc(Arena *arena, i32 size)
{
  void *result = 0;

  if (arena->offset + size <= arena->size) {
    result = &arena->backing_buffer[arena->offset];
    arena->offset += size;
  } else {
    printf("Arena ran out of memory\n");
  }

  return result;
}

internal void
arena_release(Arena *arena)
{
  arena->offset = 0;
}
