mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
Revert "Kernel: Fix kmalloc memory corruption"
This reverts commit b306f240a4
.
This commit is contained in:
parent
e374eb3035
commit
23f335bcd7
1 changed files with 3 additions and 7 deletions
|
@ -40,7 +40,6 @@
|
||||||
#include <Kernel/Scheduler.h>
|
#include <Kernel/Scheduler.h>
|
||||||
#include <Kernel/SpinLock.h>
|
#include <Kernel/SpinLock.h>
|
||||||
#include <Kernel/StdLib.h>
|
#include <Kernel/StdLib.h>
|
||||||
#include <Kernel/VM/MemoryManager.h>
|
|
||||||
|
|
||||||
#define SANITIZE_KMALLOC
|
#define SANITIZE_KMALLOC
|
||||||
|
|
||||||
|
@ -49,15 +48,12 @@ struct AllocationHeader {
|
||||||
u8 data[0];
|
u8 data[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define BASE_PHYSICAL (0xc0000000 + (4 * MiB))
|
||||||
#define CHUNK_SIZE 32
|
#define CHUNK_SIZE 32
|
||||||
#define POOL_SIZE (3 * MiB)
|
#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
|
#define ETERNAL_BASE_PHYSICAL (0xc0000000 + (2 * MiB))
|
||||||
// of the kernel image!
|
#define ETERNAL_RANGE_SIZE (2 * MiB)
|
||||||
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)
|
|
||||||
|
|
||||||
static u8 alloc_map[POOL_SIZE / CHUNK_SIZE / 8];
|
static u8 alloc_map[POOL_SIZE / CHUNK_SIZE / 8];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue