答案1
我遇到了同样的问题,但使用的是 ARM。我认为如果不重建 QEMU 二进制文件,您就无法更改它。
对于 ARM,我更改了文件 arm-compat-semi.c(提交:)d0f4aa7d
:
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
index 329ea11260..479953130d 100644
--- a/semihosting/arm-compat-semi.c
+++ b/semihosting/arm-compat-semi.c
@@ -44,7 +44,7 @@
#ifdef CONFIG_USER_ONLY
#include "qemu.h"
-#define COMMON_SEMI_HEAP_SIZE (128 * 1024 * 1024)
+#define COMMON_SEMI_HEAP_SIZE (256 * 1024 * 1024)
#else
#include "qemu/cutils.h"
将堆大小增加 128MB。
来自同一文件顶部的评论表明它可能也适用于您的情况?
Adapted for systems other than ARM, including RISC-V, by Keith Packard