Max OS 0.3
Loading...
Searching...
No Matches
allocator.cpp
1//
2// Created by 98max on 8/07/2026.
3//
4
6
7using namespace MaxOS;
8using namespace MaxOS::memory;
9using namespace MaxOS::memory::allocator;
10
15
20
27void* MemoryAllocator::expand_heap(size_t size) {
28 return nullptr;
29}
30
38void* MemoryAllocator::allocate_extra_space(size_t requested_size, size_t& actual_size) {
39 return nullptr;
40}
41
48void MemoryAllocator::setup_region(uintptr_t address, size_t length) {
49}
50
57void* MemoryAllocator::allocate(size_t size) {
58 return nullptr;
59}
60
66void MemoryAllocator::unallocate(void* pointer) {
67}
68
75 return 0;
76}
77
84size_t MemoryAllocator::align(size_t size) {
85 return 0;
86}
87
88
89
90
needs breif
virtual size_t amount_used()
Returns the amount of memory used (btyes)
Definition allocator.cpp:74
virtual void setup_region(uintptr_t address, size_t length)
Setup a region to be bump memory managed.
Definition allocator.cpp:48
virtual void unallocate(void *pointer)
Frees a block of memory.
Definition allocator.cpp:66
virtual void * allocate(size_t size)
Allocates a block of memory.
Definition allocator.cpp:57
virtual size_t align(size_t size)
Aligns the size to the chunk alignment.
Definition allocator.cpp:84