Kernel: Be more clever with physical memory

Initially allocate all physical memory except kernel memory and boot
modules. Before we just skipped all memory before kernel boot modules.
Also release memory used by boot modules after the kernel is up and
running. Once the boot modules are loaded, there is no need to keep them
in memory.
This commit is contained in:
2026-04-05 18:07:55 +03:00
parent 34b59f062b
commit e4c6539964
3 changed files with 113 additions and 21 deletions

View File

@@ -255,8 +255,8 @@ static void init2(void*)
VirtualFileSystem::initialize(cmdline.root);
dprintln("VFS initialized");
// FIXME: release memory used by modules. If modules are used
// they are already loaded in here
// NOTE: All modules should be loaded
Heap::get().release_boot_modules();
TTY::initialize_devices();