Procházet zdrojové kódy

Kernel/Memory: Add more super pages to satisfy contiguous allocations

When testing the RTL8168 driver, it seems we can't allocate super pages
anymore. Either we expand the super pages range, or find a solution to
dynamically expand the range (or let drivers utilize other ranges).
Liav A před 3 roky
rodič
revize
86fa5d71c0
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      Kernel/Memory/MemoryManager.cpp

+ 3 - 1
Kernel/Memory/MemoryManager.cpp

@@ -38,7 +38,9 @@ extern multiboot_module_entry_t multiboot_copy_boot_modules_array[16];
 extern size_t multiboot_copy_boot_modules_count;
 extern size_t multiboot_copy_boot_modules_count;
 
 
 // Treat the super pages as logically separate from .bss
 // Treat the super pages as logically separate from .bss
-__attribute__((section(".super_pages"))) static u8 super_pages[1 * MiB];
+// FIXME: Find a solution so we don't need to expand this range each time
+// we are in a situation too many drivers try to allocate super pages.
+__attribute__((section(".super_pages"))) static u8 super_pages[4 * MiB];
 
 
 namespace Kernel::Memory {
 namespace Kernel::Memory {