diff --git a/core/common/message_handler/message_handler.c b/core/common/message_handler/message_handler.c index 5021656531ac8e6688962d3507ac27458c7b6fbd..ee6ee2145c479a6698ff089c493a47a9ba3390a0 100644 --- a/core/common/message_handler/message_handler.c +++ b/core/common/message_handler/message_handler.c @@ -190,11 +190,19 @@ static void *LoopTask(void *arg) static int StartNewLooperThread(SoftBusLooper *looper) { +#ifdef __GLIBC__ +#ifdef __aarch64__ +#define MAINLOOP_STACK_SIZE 131072 +#else +#define MAINLOOP_STACK_SIZE 16384 +#endif // __aarch64__ +#else // not glibc #ifdef ASAN_BUILD #define MAINLOOP_STACK_SIZE 10240 #else #define MAINLOOP_STACK_SIZE 8192 #endif +#endif // __GLIBC__ int ret; SoftBusThreadAttr threadAttr; SoftBusThread tid; diff --git a/core/connection/common/src/softbus_thread_pool.c b/core/connection/common/src/softbus_thread_pool.c index 9f6c9f0c55cffe97352bf97e9dcdc5906246381e..badc32b5a4884b892c881ef53b9e032140f9ffb7 100755 --- a/core/connection/common/src/softbus_thread_pool.c +++ b/core/connection/common/src/softbus_thread_pool.c @@ -24,7 +24,15 @@ #include "softbus_log.h" #ifndef MIN_STACK_SIZE +#ifdef __GLIBC__ +#ifdef __aarch64__ +#define MIN_STACK_SIZE 0x20000 +#else +#define MIN_STACK_SIZE 0x4000 +#endif // __aarch64__ +#else // not glibc #define MIN_STACK_SIZE 0x8000 +#endif // __GLIBC__ #endif #define THREAD_POOL_NAME "THREAD_POOL"