Add a basic kernel heap object.

Currently allocation always fails because we don't
have a way to allocate a physical page.
This commit is contained in:
Drew Galbraith 2023-05-18 09:46:41 -07:00
parent 45b5817a36
commit 0b7e667368
6 changed files with 140 additions and 6 deletions

14
zion/memory/kernel_heap.h Normal file
View file

@ -0,0 +1,14 @@
#pragma once
#include <stdint.h>
class KernelHeap {
public:
KernelHeap(uint64_t lower_bound, uint64_t upper_bound);
void* Allocate(uint64_t size);
private:
uint64_t next_addr_;
uint64_t upper_bound_;
};