diff --git a/kernel/src/init/InitRD.cpp b/kernel/src/init/InitRD.cpp index 9863b31b..01f9432d 100644 --- a/kernel/src/init/InitRD.cpp +++ b/kernel/src/init/InitRD.cpp @@ -375,8 +375,10 @@ void InitRD::init() (void*)bootboot.initrd_ptr, Utilities::get_blocks_from_size(PAGE_SIZE, bootboot.initrd_size)); kdbgln("physical base at %lx, size %lx, mapped to %p", bootboot.initrd_ptr, bootboot.initrd_size, initrd_base); kdbgln("total blocks: %ld", get_total_blocks()); + void* leak = kmalloc(4); // leak some memory so that kmalloc doesn't continually allocate and free pages initrd_initialize_root(); initrd_scan(); VFS::mount_root(&initrd_root); initrd_initialized = true; + kfree(leak); } \ No newline at end of file