From 52b04bd33bf450d325930b1fb511b6d16c622d50 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 20 Sep 2023 19:58:26 +0200 Subject: [PATCH] kernel: Increase the OOM threshold to 4 MiB free --- kernel/src/memory/MemoryManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/src/memory/MemoryManager.cpp b/kernel/src/memory/MemoryManager.cpp index 018c284d..eb0a7ab1 100644 --- a/kernel/src/memory/MemoryManager.cpp +++ b/kernel/src/memory/MemoryManager.cpp @@ -157,10 +157,10 @@ namespace MemoryManager used_mem += ARCH_PAGE_SIZE; free_mem -= ARCH_PAGE_SIZE; - if (free_mem < 1024 * 1024) + if (free_mem < 4 * 1024 * 1024) { - // Less than 1 MiB of free memory! Let's start clearing caches... - kwarnln("Less than 1 MiB of free memory, clearing caches to try to gain extra memory"); + // Less than 4 MiB of free memory! Let's start clearing caches... + kwarnln("Less than 4 MiB of free memory, clearing caches to try to gain extra memory"); Scheduler::signal_oom_thread(); }