From 56ec2e2e4a60d792b32dd5e78d58455c3b4ae24c Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Mon, 7 Oct 2024 12:12:20 -0400 Subject: [PATCH] Only increase sigalthreads stack size for simulator or aarch64 builds. The 12K-per-thread necessary on arm64 linux systems caused an unnecessary 180K increase in RAM usage on the hibyos hosted ports. So back off to the old size unless we know it was needed. Change-Id: I1e25417433052027ae02a51903b0f5245819db44 --- firmware/asm/thread.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/asm/thread.h b/firmware/asm/thread.h index fb7065e6fd..831de9ae8d 100644 --- a/firmware/asm/thread.h +++ b/firmware/asm/thread.h @@ -50,8 +50,12 @@ struct regs #ifndef MINSIGSTKSZ #define MINSIGSTKSZ 16384 #endif - /* MINSIGSTKSZ for the OS to deliver the signal + 0x6000 for us */ + /* MINSIGSTKSZ for the OS to deliver the signal, plus more for us */ +#if defined(SIMULATOR) || defined(__aarch64__) #define DEFAULT_STACK_SIZE (MINSIGSTKSZ+0x6000) /* Bytes */ +#else + #define DEFAULT_STACK_SIZE (MINSIGSTKSZ+0x3000) /* Bytes */ +#endif #elif defined(HAVE_WIN32_FIBER_THREADS) #define DEFAULT_STACK_SIZE 0x1000 /* Bytes */ #endif