From ba83bf8a0dce5a4f47738663d986cb1f7a5a7ac6 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 22 Feb 2020 14:18:34 +0100 Subject: [PATCH] Kernel: Increase kmalloc chunk size from 8 bytes to 32 bytes This gives a huge speedup when running "git status" in a SerenityOS repository directory. Most of the time was spent allocating strings. --- Kernel/Heap/kmalloc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp index 7a5f25fb129..9c79fc29b8c 100644 --- a/Kernel/Heap/kmalloc.cpp +++ b/Kernel/Heap/kmalloc.cpp @@ -47,7 +47,7 @@ struct [[gnu::packed]] allocation_t }; #define BASE_PHYSICAL (0xc0000000 + (4 * MB)) -#define CHUNK_SIZE 8 +#define CHUNK_SIZE 32 #define POOL_SIZE (3 * MB) #define ETERNAL_BASE_PHYSICAL (0xc0000000 + (2 * MB))