|PTHREAD_ATTR_SETGUARDSIZE(3)||Library Functions Manual||PTHREAD_ATTR_SETGUARDSIZE(3)|
set and get guardsize attribute
pthread_attr_getguardsize(), respectively, set
and get the thread creation guardsize attribute in the
attr object. If guardsize is
zero, a guard area shall not be provided for threads created with
attr. If guardsize is greater
than zero, a guard area of at least size guardsize
bytes shall be provided for each thread created with
The guardsize attribute controls the size of the guard area for the created thread's stack. The guardsize attribute provides protection against overflow of the stack pointer. If a thread's stack is created with guard protection, the implementation allocates extra memory at the overflow end of the stack as a buffer against stack overflow of the stack pointer. If an application overflows into this buffer an error shall result (possibly in a SIGSEGV signal being delivered to the thread).
Upon successful completion,
pthread_attr_getguardsize() return a value of 0.
Otherwise, an error number is returned to indicate the error.
stores the guardsize attribute value in
guardsize if successful.
No errors are defined.
These functions will not return an error code of
pthread_attr_getguardsize() conform to ISO/IEC
9945-1 ANSI/IEEE (“POSIX”) Std 1003.1, 2004 Edition.
|June 5, 2013||OpenBSD-current|