ed1787d
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
ed1787d
From: Daniel Axtens <dja@axtens.net>
ed1787d
Date: Tue, 20 Sep 2022 00:30:30 +1000
ed1787d
Subject: [PATCH] efi: Increase default memory allocation to 32 MiB
ed1787d
ed1787d
We have multiple reports of things being slower with a 1 MiB initial static
ed1787d
allocation, and a report (more difficult to nail down) of a boot failure
ed1787d
as a result of the smaller initial allocation.
ed1787d
ed1787d
Make the initial memory allocation 32 MiB.
ed1787d
ed1787d
Signed-off-by: Daniel Axtens <dja@axtens.net>
ed1787d
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
ed1787d
(cherry picked from commit 75e38e86e7d9202f050b093f20500d9ad4c6dad9)
ed1787d
---
ed1787d
 grub-core/kern/efi/mm.c | 2 +-
ed1787d
 1 file changed, 1 insertion(+), 1 deletion(-)
ed1787d
ed1787d
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
ed1787d
index 016ba6cf2f..b27e966e1f 100644
ed1787d
--- a/grub-core/kern/efi/mm.c
ed1787d
+++ b/grub-core/kern/efi/mm.c
ed1787d
@@ -39,7 +39,7 @@
ed1787d
 #define MEMORY_MAP_SIZE	0x3000
ed1787d
 
ed1787d
 /* The default heap size for GRUB itself in bytes.  */
ed1787d
-#define DEFAULT_HEAP_SIZE	0x100000
ed1787d
+#define DEFAULT_HEAP_SIZE	0x2000000
ed1787d
 
ed1787d
 static void *finish_mmap_buf = 0;
ed1787d
 static grub_efi_uintn_t finish_mmap_size = 0;