Set thread stack attribute
#include <pthread.h>
int pthread_attr_setstacklazy(
pthread_attr_t * attr,
int lazystack );
libc
The pthread_attr_setstacklazy() function sets the thread
stack attribute in the attribute object attr to
lazystack.
Possible values for lazystack are:
- PTHREAD_STACK_LAZY
- Allocate physical memory for the thread stack on demand (the default).
- PTHREAD_STACK_NOTLAZY
- Allocate physical memory for the whole stack up front.
Use this value to ensure that your server processes don't die later on
because it's unable to allocate stack memory. We recommend that you set the stack size as
well since the default stack size is probably much larger than you really need.
- EOK
- Success.
- EINVAL
- Invalid thread attribute object attr.
- ENOTSUP
- Invalid thread inherit scheduling attribute lazystack.
QNX 6
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
pthread_attr_getstacklazy(),
pthread_attr_setinheritsched()