1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

Kernel: Reorganize memory layout a bit

Move the kernel image to the 1 MB physical mark. This prevents it from
colliding with stuff like the VGA memory. This was causing us to end
up with the BIOS screen contents sneaking into kernel memory sometimes.

This patch also bumps the kmalloc heap size from 1 MB to 3 MB. It's not
the perfect permanent solution (obviously) but it should get the OOM
monkey off our backs for a while.
This commit is contained in:
Andreas Kling 2019-11-04 12:00:29 +01:00
parent ea4e02ed86
commit 19398cd7d5
4 changed files with 26 additions and 21 deletions

View file

@ -20,15 +20,13 @@ struct [[gnu::packed]] allocation_t
size_t nchunk;
};
#define BASE_PHYSICAL (4 * MB)
#define CHUNK_SIZE 8
#define POOL_SIZE (1024 * 1024)
#define POOL_SIZE (3 * MB)
#define ETERNAL_BASE_PHYSICAL (1 * MB)
#define ETERNAL_BASE_PHYSICAL (2 * MB)
#define ETERNAL_RANGE_SIZE (2 * MB)
#define BASE_PHYSICAL (3 * MB)
#define RANGE_SIZE (1 * MB)
static u8 alloc_map[POOL_SIZE / CHUNK_SIZE / 8];
volatile size_t sum_alloc = 0;