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:
parent
45b5817a36
commit
0b7e667368
6 changed files with 140 additions and 6 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "common/gdt.h"
|
||||
#include "debug/debug.h"
|
||||
#include "interrupt/interrupt.h"
|
||||
#include "memory/kernel_heap.h"
|
||||
#include "memory/paging_util.h"
|
||||
|
||||
extern "C" void zion() {
|
||||
|
|
@ -12,12 +13,8 @@ extern "C" void zion() {
|
|||
InitIdt();
|
||||
InitPaging();
|
||||
|
||||
const limine_memmap_response& resp = boot::GetMemoryMap();
|
||||
dbgln("Base,Length,Type");
|
||||
for (uint64_t i = 0; i < resp.entry_count; i++) {
|
||||
const limine_memmap_entry& entry = *resp.entries[i];
|
||||
dbgln("%m,%x,%u", entry.base, entry.length, entry.type);
|
||||
}
|
||||
KernelHeap heap(0xFFFFFFFF'40000000, 0xFFFFFFFF'80000000);
|
||||
heap.Allocate(1);
|
||||
|
||||
while (1)
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue