mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-16 11:41:46 -07:00
Setup Context's logger and fallback. (Not yet used in implementation).
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user