Changes the stacksize attribute in the specified thread attributes object.
pthread_attr_setstacksize(
                          attr,
                          stacksize );
 
Argument         Data Type               Access
attr             opaque pthread_attr_t   write
stacksize        size_t                  read
#includeint pthread_attr_setstacksize ( pthread_attr_t *attr, size_t stacksize);
A thread's stack is fixed at the time of thread creation. Only the initial thread can dynamically extend its stack.
Many compilers do not check for stack overflow. Ensure that your thread stack is large enough for anything that you call from the thread.
Return Description0 Successful completion. [EINVAL] The value specified by attr is invalid, or the value specified by stacksize is less than {PTHREAD_STACK_MIN} or exceeds a system-imposed limit.
pthread_attr_init pthread_attr_getstacksize pthread_create