diff --git a/AK/kmalloc.h b/AK/kmalloc.h index c1068d7f67a..9b21df3094b 100644 --- a/AK/kmalloc.h +++ b/AK/kmalloc.h @@ -11,7 +11,7 @@ #endif #ifdef KERNEL -# include +# include #else # include diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index 3be5c96cb19..f609b474592 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include enum ProcParentDirectory { diff --git a/Kernel/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp similarity index 99% rename from Kernel/kmalloc.cpp rename to Kernel/Heap/kmalloc.cpp index 4985f84647e..9f3256eb4ff 100644 --- a/Kernel/kmalloc.cpp +++ b/Kernel/Heap/kmalloc.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #define SANITIZE_KMALLOC @@ -20,7 +20,7 @@ struct [[gnu::packed]] allocation_t size_t nchunk; }; -#define CHUNK_SIZE 32 +#define CHUNK_SIZE 8 #define POOL_SIZE (1024 * 1024) #define ETERNAL_BASE_PHYSICAL (1 * MB) diff --git a/Kernel/kmalloc.h b/Kernel/Heap/kmalloc.h similarity index 100% rename from Kernel/kmalloc.h rename to Kernel/Heap/kmalloc.h diff --git a/Kernel/Makefile b/Kernel/Makefile index 9988ceb6070..3a1d0efdae2 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -2,7 +2,7 @@ include ../Makefile.common KERNEL_OBJS = \ init.o \ - kmalloc.o \ + Heap/kmalloc.o \ StdLib.o \ Lock.o \ Arch/i386/CPU.o \ diff --git a/Kernel/Net/NetworkAdapter.cpp b/Kernel/Net/NetworkAdapter.cpp index 191e97044ce..39cac3363c4 100644 --- a/Kernel/Net/NetworkAdapter.cpp +++ b/Kernel/Net/NetworkAdapter.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include static Lockable>& all_adapters() { diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index e4708a94839..ed999e4ad59 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include diff --git a/Kernel/StdLib.cpp b/Kernel/StdLib.cpp index eec8960d0a2..822dc33cd19 100644 --- a/Kernel/StdLib.cpp +++ b/Kernel/StdLib.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include extern "C" { diff --git a/Kernel/TTY/VirtualConsole.cpp b/Kernel/TTY/VirtualConsole.cpp index f3cd15221cb..653fd4d3df5 100644 --- a/Kernel/TTY/VirtualConsole.cpp +++ b/Kernel/TTY/VirtualConsole.cpp @@ -1,7 +1,7 @@ #include "VirtualConsole.h" #include "IO.h" #include "StdLib.h" -#include "kmalloc.h" +#include #include #include #include diff --git a/Kernel/VM/PhysicalPage.cpp b/Kernel/VM/PhysicalPage.cpp index 654caff7d5b..6fa76364cd4 100644 --- a/Kernel/VM/PhysicalPage.cpp +++ b/Kernel/VM/PhysicalPage.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include NonnullRefPtr PhysicalPage::create(PhysicalAddress paddr, bool supervisor, bool may_return_to_freelist) { diff --git a/Kernel/init.cpp b/Kernel/init.cpp index c8145af2edb..f6a1da6c901 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -3,7 +3,6 @@ #include "Process.h" #include "RTC.h" #include "Scheduler.h" -#include "kmalloc.h" #include "kstdio.h" #include #include @@ -30,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -168,7 +168,7 @@ extern "C" [[noreturn]] void init() // this is only used one time, directly below here. we can't use this part // of libc at this point in the boot process, or we'd just pull strstr in // from . - auto bad_prefix_check = [](const char *str, const char *search) -> bool { + auto bad_prefix_check = [](const char* str, const char* search) -> bool { while (*search) if (*search++ != *str++) return false; @@ -230,8 +230,7 @@ extern "C" [[noreturn]] void init() address.slot(), address.function(), id.vendor_id, - id.device_id - ); + id.device_id); }); if (multiboot_info_ptr->framebuffer_type == 1) { @@ -239,8 +238,7 @@ extern "C" [[noreturn]] void init() PhysicalAddress((u32)(multiboot_info_ptr->framebuffer_addr)), multiboot_info_ptr->framebuffer_pitch, multiboot_info_ptr->framebuffer_width, - multiboot_info_ptr->framebuffer_height - ); + multiboot_info_ptr->framebuffer_height); } else { new BXVGADevice; }