diff options
author | Ned Deily <nad@acm.org> | 2012-03-13 18:31:36 (GMT) |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2012-03-13 18:31:36 (GMT) |
commit | 577c830531ae6d021ac6f3ca7d9a5c44c879b068 (patch) | |
tree | a72a77885453fdd1057e2b472b688a7a3e7ba525 /Python | |
parent | bd273c1ec320e3cfda41e5739180d86e052cbc80 (diff) | |
parent | 7ca97d5208e37690f43045d5f89098f42d88fd0f (diff) | |
download | cpython-577c830531ae6d021ac6f3ca7d9a5c44c879b068.zip cpython-577c830531ae6d021ac6f3ca7d9a5c44c879b068.tar.gz cpython-577c830531ae6d021ac6f3ca7d9a5c44c879b068.tar.bz2 |
Issue #14184: merge
Diffstat (limited to 'Python')
-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 4b61e18..4f9e2c1 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 |