# Juliet\include\Core\Memory\MemoryArena

## Source Files
- Header: `Juliet\include\Core\Memory\MemoryArena.h`
- Source: `Juliet\src\Core\Memory\MemoryArena.cpp`

## AI Description
This C++ component is designed to manage memory allocations and deallocations in a high-performance manner. It provides an efficient way to allocate, reallocate, and free memory blocks within a single arena, which can be particularly useful for optimizing memory usage in applications that require frequent memory management. The component includes features such as automatic memory allocation, reallocation, and deallocation, as well as support for debugging information to help identify memory leaks or other issues.

## Symbols

### Namespace `Juliet`

#### Classes, Structs & Unions
- `struct Arena`
- `struct TempArena`
- `struct ArenaParams`

#### Functions & Methods
- `constexpr global uint64 g_Arena_Default_Reserve_Size = Megabytes(64)`
- `constexpr global uint64 g_Arena_Default_Commit_Size  = Kilobytes(64)`
- `[[nodiscard]] JULIET_API Arena* ArenaAllocate(const ArenaParams& params   JULIET_DEBUG_ONLY(, const char* name),
                                                  const std::source_location& loc = std::source_location::current())`
- `JULIET_API void ArenaRelease(NonNullPtr<Arena> arena)`
- `// Raw Push, can be used but templated helpers exists below
    // Raw Push, can be used but templated helpers exists below
    [[nodiscard]] JULIET_API void* ArenaPush(NonNullPtr<Arena> arena, size_t size, size_t align,
                                             bool shouldBeZeroed JULIET_DEBUG_ONLY(, const char* tag))`
- `[[nodiscard]] JULIET_API void* ArenaReallocate(NonNullPtr<Arena> arena, void* oldPtr, size_t oldSize, size_t newSize,
                                                   size_t align, bool shouldBeZeroed JULIET_DEBUG_ONLY(, const char* tag))`
- `JULIET_API void ArenaPopTo(NonNullPtr<Arena> arena, size_t position)`
- `JULIET_API void ArenaPop(NonNullPtr<Arena> arena, size_t amount)`
- `JULIET_API void ArenaClear(NonNullPtr<Arena> arena)`
- `[[nodiscard]] JULIET_API size_t ArenaPos(NonNullPtr<Arena> arena)`
- `TempArena ArenaTempBegin(NonNullPtr<Arena> arena)`
- `void ArenaTempEnd(TempArena temp)`

