11#ifndef MAXOS_MEMORY_ALLOCATOR_H
12#define MAXOS_MEMORY_ALLOCATOR_H
17namespace MaxOS::memory::allocator {
27 virtual void* expand_heap(
size_t size);
28 virtual void* allocate_extra_space(
size_t requested_size,
size_t& actual_size);
34 virtual void setup_region(uintptr_t address,
size_t length);
40 virtual size_t align(
size_t size);
Generic memory allocator type.
virtual ~MemoryAllocator()
virtual size_t amount_used()
Returns the amount of memory used (btyes)
virtual void setup_region(uintptr_t address, size_t length)
Setup a region to be bump memory managed.
virtual void unallocate(void *pointer)
Frees a block of memory.
virtual void * allocate(size_t size)
Allocates a block of memory.
virtual size_t align(size_t size)
Aligns the size to the chunk alignment.