pthread_attr_setstacksize(3) Library Functions Manual pthread_attr_setstacksize, pthread_attr_getstacksize - / POSIX threads library (libpthread, -lpthread) #include int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); int pthread_attr_getstacksize(const pthread_attr_t *restrict attr, size_t *restrict stacksize); pthread_attr_setstacksize() , attr, stacksize. ( ), , attr. pthread_attr_getstacksize() , attr, stacksize. 0; . pthread_attr_setstacksize() : EINVAL PTHREAD_STACK_MIN (16384) . pthread_attr_setstacksize() EINVAL, stacksize . attributes(7). +-----------------------------+----------------------------------------------------------+--------------------------+ | | | | +-----------------------------+----------------------------------------------------------+--------------------------+ |pthread_attr_setstacksize(), | | MT-Safe | |pthread_attr_getstacksize() | | | +-----------------------------+----------------------------------------------------------+--------------------------+ glibc 2.1. POSIX.1-2001, POSIX.1-2008. pthread_create(3). . . pthread_attr_setstack(3) , . glibc 2.8, stacksize STACK_ALIGN ( 16 ), , POSIX.1, , stacksize . pthread_create(3). getrlimit(2), pthread_attr_init(3), pthread_attr_setguardsize(3), pthread_attr_setstack(3), pthread_create(3), pthreads(7) () Alexey, Azamat Hackimov , kogamatranslator49 , Darima Kogan , Max Is , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . pthread_attr_setstacksize(3)