BDE 4.14.0 Production release
|
#include <bslmt_configuration.h>
Static Public Member Functions | |
static int | defaultThreadStackSize () |
static int | nativeDefaultThreadStackSize () |
static int | nativeDefaultThreadGuardSize () |
static int | recommendedDefaultThreadStackSize () |
static void | setDefaultThreadStackSize (int numBytes) |
This struct
provides a namespace for a suite of functions that are used to manage the configuration of default values used in bslmt
. Specifically, these functions manage the default value of thread stack size and provide access to the platform's native guard size, but may be extended to govern more traits in the future.
|
static |
Return the value set by the last call to setDefaultThreadStackSize
; if setDefaultThreadStackSize
has never been called, return ThreadAttributes::BSLMT_UNSET_STACK_SIZE
which will signal thread creation to use the thread stack size native to the platform.
|
static |
Return the default thread stack guard size (in bytes) determined by the underlying platform. Note that this value reflects semantics, and may be influenced by the choice of platform, environment variables, compiler/linker options, or shell configuration, and may vary somewhat among different platforms.
|
static |
Return the "native" default thread stack size (in bytes) as determined by the underlying platform. Note that this value may be influenced by the choice of platform, environment variables, compiler/linker options, or shell configuration, and typically varies wildly among different platforms.
|
static |
Return a "reasonable" value for the default thread stack size (in bytes), which, unlike nativeDefaultThreadStackSize
, is constant across all platforms of a given word size. This value is large enough to guarantee that an automatic array of at least 250 * 1024 pointers may be declared in the top level routine of the thread.
|
static |
Set the default thread stack size to the specified numBytes
. If a minimum thread stack size is known for the underlying platform (i.e. PTHREAD_STACK_MIN
is defined) and numBytes
is below that minimum, the stack size will be that minimum. The behavior is undefined unless 0 <= numBytes
.