summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-06-02 20:15:37 -0400
committerRich Felker <dalias@aerifal.cx>2012-06-02 20:15:37 -0400
commit13b3645c46518e0e2fb91f0d665e60f7a8a44b2b (patch)
tree3b054aeedcd83b7377dfdc1653a7f7ed7b866952 /src
parent40bd1726b6aa93a8311a77a1fec6da0fe0489fd0 (diff)
downloadmusl-13b3645c46518e0e2fb91f0d665e60f7a8a44b2b.tar.gz
increase default thread stack size to 80k
I've been looking for data that would suggest a good default, and since little has shown up, i'm doing this based on the limited data I have. the value 80k is chosen to accommodate 64k of application data (which happens to be the size of the buffer in git that made it crash without a patch to call pthread_attr_setstacksize) plus the max stack usage of most libc functions (with a few exceptions like crypt, which will be fixed soon to avoid excessive stack usage, and [n]ftw, which inherently uses a fair bit in recursive directory searching). if further evidence emerges suggesting that the default should be larger, I'll consider changing it again, but I'd like to avoid it getting too large to avoid the issues of large commit charge and rapid address space exhaustion on 32-bit machines.
Diffstat (limited to 'src')
-rw-r--r--src/internal/pthread_impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
index 01e6e5a0..d67edf2f 100644
--- a/src/internal/pthread_impl.h
+++ b/src/internal/pthread_impl.h
@@ -110,7 +110,7 @@ void __wake(volatile int *, int, int);
void __synccall_lock();
void __synccall_unlock();
-#define DEFAULT_STACK_SIZE (16384-PAGE_SIZE)
+#define DEFAULT_STACK_SIZE 81920
#define DEFAULT_GUARD_SIZE PAGE_SIZE
#endif