From f23bdc29ef6d46741a43a683b2434bcc32a12ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 5 Aug 2025 07:34:15 +0200 Subject: [PATCH] Document the current default stack sizes on different systems The default stack sizes varies between operating systems and between different system libc libraries from 128kB (Alpine Linux with MUSL) to 8M (Linux with glibc). Document the different values used to justify the value of THREAD_MINSTACKSIZE (currently set to 1MB). --- lib/isc/thread_p.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/isc/thread_p.h b/lib/isc/thread_p.h index 0fd02a9684..b31e6c3038 100644 --- a/lib/isc/thread_p.h +++ b/lib/isc/thread_p.h @@ -17,6 +17,14 @@ /*! \file */ +/* + * The current default stack sizes are as follows: + * - Linux glibc: 8MB + * - Linux musl: 128kB + * - FreeBSD: 2MB + * - OpenBSD: 512kB + * - NetBSD: 4MB + */ #ifndef THREAD_MINSTACKSIZE #define THREAD_MINSTACKSIZE (1U * 1024 * 1024) #endif /* ifndef THREAD_MINSTACKSIZE */