fix(heap, readme): MemoryAllocator => Heap, update readme

This commit is contained in:
Daniel Hammer
2025-03-01 15:27:54 +04:00
parent db005c0404
commit c3030ec15d
7 changed files with 23 additions and 14 deletions
+29
View File
@@ -0,0 +1,29 @@
#pragma once
#include "Memmap.hpp"
namespace Memory {
class Allocator {
LargestSection g_section;
struct Block {
size_t size;
Block* next;
};
struct BlockDescriptor {
size_t block_size;
};
Block head;
public:
Allocator(LargestSection section);
void* Request(size_t size, bool phys = false);
void* Realloc(void* ptr, size_t size);
void Free(void *pagePtr);
void Stress();
void Walk();
};
extern Allocator* g_allocator;
};