#include "memory.h" #include "debug.h" #include "kprintf.h" #include uint32_t *page_directory = &boot_page_directory; uint32_t page_table_default[1024] __attribute__((aligned(4096))); uint64_t mem_size; void init_memory(void) { assert(page_directory); for (uint16_t i = 0; i < 0x300; i++) page_directory[i] = 0x02; init_page_table(page_table_default, 0); page_directory[0] = ((uint32_t)page_table_default - HEAP_END) | 0x03; }