Setup Context's logger and fallback. (Not yet used in implementation).

This commit is contained in:
2025-02-19 10:50:36 -05:00
parent 727b54c341
commit 844d431e1c
7 changed files with 95 additions and 46 deletions

View File

@ -134,12 +134,6 @@ GEN_API void* heap_allocator_proc( void* allocator_data, AllocType type, ssize s
//! The heap allocator backed by operating system's memory manager.
constexpr AllocatorInfo heap( void ) { AllocatorInfo allocator = { heap_allocator_proc, nullptr }; return allocator; }
//! Helper to allocate memory using heap allocator.
#define malloc( sz ) alloc( heap(), sz )
//! Helper to free memory allocated by heap allocator.
#define mfree( ptr ) allocator_free( heap(), ptr )
struct VirtualMemory
{
void* data;
@ -185,6 +179,8 @@ void arena_check (Arena* arena);
void arena_free (Arena* arena);
ssize arena_size_remaining(Arena* arena, ssize alignment);
// TODO(Ed): Add arena_pos, arena_pop, and arena_pop_to
struct Arena
{
AllocatorInfo Backing;