Multithreaded Programming Guide

Getting the Stack Guard Size

pthread_attr_getguardsize(3C) gets the guardsize of the attr object.

pthread_attr_getguardsize Syntax

#include <pthread.h>

int pthread_attr_getguardsize(const pthread_attr_t *restrict attr, 
size_t  *restrict guardsize);

A conforming implementation is permitted to round up the value contained in guardsize to a multiple of the configurable system variable PAGESIZE . See PAGESIZE in sys/mman.h. If an implementation rounds up the value of guardsize to a multiple of PAGESIZE, a call to pthread_attr_getguardsize() that specifies attr stores, in guardsize, the guard size specified in the previous call to pthread_attr_setguardsize().

pthread_attr_getguardsize Return Values

pthread_attr_getguardsize() fails if:



The argument attr is invalid, the argument guardsize is invalid, or the argument guardsize contains an invalid value.