![]() |
GetDefaultThreadStackSize |
||||
Header: | Threads.h | Carbon status: | Supported | |
Determines the default stack size required by a thread.
OSErr GetDefaultThreadStackSize ( ThreadStyle threadStyle, Size *stackSize );
The type of thread to get information about. Cooperative is the only type that you can specify. Historically, the Thread Manger supported two types of threads, preemptive and cooperative, but the Thread Manager no longer supports preemptive threads.
On return, a pointer to the default stack size (in bytes). When you create a thread pool or an individual thread, this is the stack size that the Thread Manager allocates when you specify the default size.
A result code.
Keep in mind that the default stack size is not an absolute value that you must use but is a rough estimate.
To determine how much stack space is available for a particular thread, use the ThreadCurrentStackSpace function.
Supported in Carbon. Available in CarbonLib 1.0 and later when ThreadsLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by ThreadsLib 1.0 and later.