diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-22 16:34:08 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-22 16:34:08 +0200 |
commit | 23f335bcd7d31e827f1a5fbda5e210721dcae813 (patch) | |
tree | f9741a003a06c36ead70c963157c6d4aaf95de55 /Kernel | |
parent | e374eb30357cf47fb09fde18c89942bddd7d5344 (diff) | |
download | serenity-23f335bcd7d31e827f1a5fbda5e210721dcae813.zip |
Revert "Kernel: Fix kmalloc memory corruption"
This reverts commit b306f240a4a3ef4a8f5797734457572e0026cc0c.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Heap/kmalloc.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp index df2f4dd23b..5936b3641b 100644 --- a/Kernel/Heap/kmalloc.cpp +++ b/Kernel/Heap/kmalloc.cpp @@ -40,7 +40,6 @@ #include <Kernel/Scheduler.h> #include <Kernel/SpinLock.h> #include <Kernel/StdLib.h> -#include <Kernel/VM/MemoryManager.h> #define SANITIZE_KMALLOC @@ -49,15 +48,12 @@ struct AllocationHeader { u8 data[0]; }; +#define BASE_PHYSICAL (0xc0000000 + (4 * MiB)) #define CHUNK_SIZE 32 #define POOL_SIZE (3 * MiB) -#define ETERNAL_RANGE_SIZE (2 * MiB) -// We need to make sure to not stomp on global variables or other parts -// of the kernel image! -extern u32 end_of_kernel_bss; -#define ETERNAL_BASE_PHYSICAL ((u8*)PAGE_ROUND_UP(&end_of_kernel_bss)) -#define BASE_PHYSICAL (ETERNAL_BASE_PHYSICAL + ETERNAL_RANGE_SIZE) +#define ETERNAL_BASE_PHYSICAL (0xc0000000 + (2 * MiB)) +#define ETERNAL_RANGE_SIZE (2 * MiB) static u8 alloc_map[POOL_SIZE / CHUNK_SIZE / 8]; |