struct Core::Allocator
Overview
Memory allocator interface. More…
#include <coreallocator.h> struct Allocator { // methods static Allocator& getDefault (); virtual void* allocate (uint32 size) = 0; virtual void* reallocate (void* address, uint32 size) = 0; virtual void deallocate (void* address) = 0; };
Detailed Documentation
Memory allocator interface.
Methods
static Allocator& getDefault ()
Get default allocator instance.
virtual void* allocate (uint32 size) = 0
Allocate a contiguous memory block of a given size.
virtual void* reallocate (void* address, uint32 size) = 0
Resize a memory block that was previously allocated with allocate or allocate a new block.
Might move existing data to a new location.
virtual void deallocate (void* address) = 0
Free previously allocated data.