diff options
| author | Ned Deily <nad@acm.org> | 2012-03-13 11:31:36 -0700 |
|---|---|---|
| committer | Ned Deily <nad@acm.org> | 2012-03-13 11:31:36 -0700 |
| commit | b994a9ced52a825a72d37c25d983d09c2cbc656b (patch) | |
| tree | f07f3e0a75bd4be2f9df54e410c3bd81c9d434bd /Python/thread_pthread.h | |
| parent | 75ff7e8c4aa9633a8c87788c24ab8335fa1dd698 (diff) | |
| parent | 8ea2737127f00f370698ceb9132ab23245f33763 (diff) | |
| download | cpython-b994a9ced52a825a72d37c25d983d09c2cbc656b.tar.gz | |
Issue #14184: merge
Diffstat (limited to 'Python/thread_pthread.h')
| -rw-r--r-- | Python/thread_pthread.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 4b61e18941..4f9e2c19d6 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -19,14 +19,18 @@ #define THREAD_STACK_SIZE 0 /* use default stack size */ #endif -#if (defined(__APPLE__) || defined(__FreeBSD__)) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0 - /* The default stack size for new threads on OSX is small enough that - * we'll get hard crashes instead of 'maximum recursion depth exceeded' - * exceptions. - * - * The default stack size below is the minimal stack size where a - * simple recursive function doesn't cause a hard crash. - */ +/* The default stack size for new threads on OSX and BSD is small enough that + * we'll get hard crashes instead of 'maximum recursion depth exceeded' + * exceptions. + * + * The default stack sizes below are the empirically determined minimal stack + * sizes where a simple recursive function doesn't cause a hard crash. + */ +#if defined(__APPLE__) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0 +#undef THREAD_STACK_SIZE +#define THREAD_STACK_SIZE 0x500000 +#endif +#if defined(__FreeBSD__) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0 #undef THREAD_STACK_SIZE #define THREAD_STACK_SIZE 0x400000 #endif |
