From 3c1f9a126b809a7de3d45654966b4ff31ca80c4a Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 29 Jul 2024 17:52:54 -0400 Subject: [PATCH] kernel/heap: Increase the guarded heap 'initial' & 'grow' sizes. With the standard defaults it wastes too much memory and didn't boot. With these it successfully boots to desktop, for me at least. --- headers/private/kernel/heap.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/headers/private/kernel/heap.h b/headers/private/kernel/heap.h index 9a6dea6fc8..2127317174 100644 --- a/headers/private/kernel/heap.h +++ b/headers/private/kernel/heap.h @@ -20,7 +20,12 @@ // ... and a lot of reserves to keep running. #define HEAP_GROW_SIZE 128 * 1024 * 1024 -#else // USE_GUARDED_HEAP_FOR_MALLOC && USE_GUARDED_HEAP_FOR_OBJECT_CACHE +#elif USE_GUARDED_HEAP_FOR_MALLOC + +#define INITIAL_HEAP_SIZE 32 * 1024 * 1024 +#define HEAP_GROW_SIZE 32 * 1024 * 1024 + +#else // allocate 16MB initial heap for the kernel #define INITIAL_HEAP_SIZE 16 * 1024 * 1024 @@ -31,7 +36,7 @@ // use areas for allocations bigger than 1MB #define HEAP_AREA_USE_THRESHOLD 1 * 1024 * 1024 -#endif // !(USE_GUARDED_HEAP_FOR_MALLOC && USE_GUARDED_HEAP_FOR_OBJECT_CACHE) +#endif // allocation/deallocation flags for {malloc,free}_etc()