pthread_attr_setguardsize(3) Library Functions Manual pthread_attr_setguardsize, pthread_attr_getguardsize - / POSIX (libpthread -lpthread) #include int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); int pthread_attr_getguardsize(const pthread_attr_t *restrict attr, size_t *restrict guardsize); pthread_attr_setguardsize() attr guardsize. guardsize 0 attr guardsize ( ). guardsize 0 attr . . attr ( pthread_attr_setstack(3) pthread_attr_setstackaddr(3)) ( ): ( mprotect(2) ). pthread_attr_getguardsize() attr guardsize. 0 . POSIX.1 EINVAL attr guardsize . ( ). attributes(7). +------------+------------------------------------+--------------------+ || | | +------------+------------------------------------+--------------------+ |pthread_attr_setguardsize()| | MT-Safe | |pthread_attr_getguardsize()| | | +------------+------------------------------------+--------------------+ POSIX.1-2008. glibc 2.1. POSIX.1-2001. . SIGSEGV . . ( pthread_attr_getguardsize() pthread_attr_setguardsize().) 0 . . glibc 2.8 NPTL POSIX.1. ( EINVAL pthread_create(3) .) LinuxThreads . pthread_getattr_np(3). mmap(2) mprotect(2) pthread_attr_init(3) pthread_attr_setstack(3) pthread_attr_setstacksize(3) pthread_create(3) pthreads(7) 3 . . : . 6.18 17 2025 pthread_attr_setguardsize(3)