1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

thread_pthread.c: RUBY_STACK_MIN

* thread_pthread.c (RUBY_STACK_MIN): may not a compile time constant.
  fix r37079.  [ruby-dev:46322] [Bug #7247]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-11-01 10:47:27 +00:00
parent ba1bd089c8
commit 5aa7ff2b8a
2 changed files with 15 additions and 10 deletions

View file

@ -1,3 +1,8 @@
Thu Nov 1 19:47:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_pthread.c (RUBY_STACK_MIN): may not a compile time constant.
fix r37079. [ruby-dev:46322] [Bug #7247]
Thu Nov 1 16:44:36 2012 Shugo Maeda <shugo@ruby-lang.org>
* NEWS: add note for Module#refine, Module#refinements,

View file

@ -596,17 +596,17 @@ enum {
RUBY_STACK_MIN_LIMIT = 512 * 1024, /* 512KB */
#endif
RUBY_STACK_SPACE_LIMIT = 1024 * 1024,
#ifdef PTHREAD_STACK_MIN
RUBY_STACK_MIN = ((RUBY_STACK_MIN_LIMIT < PTHREAD_STACK_MIN) ?
PTHREAD_STACK_MIN * 2 : RUBY_STACK_MIN_LIMIT),
#else
RUBY_STACK_MIN = (RUBY_STACK_MIN_LIMIT),
#endif
RUBY_STACK_SPACE_RATIO = 5,
RUBY_STACK_MIN_SPACE = RUBY_STACK_MIN/RUBY_STACK_SPACE_RATIO,
RUBY_STACK_SPACE = ((RUBY_STACK_MIN_SPACE > RUBY_STACK_SPACE_LIMIT) ?
RUBY_STACK_SPACE_LIMIT : RUBY_STACK_MIN_SPACE)
RUBY_STACK_SPACE_RATIO = 5
};
#ifdef PTHREAD_STACK_MIN
#define RUBY_STACK_MIN ((RUBY_STACK_MIN_LIMIT < PTHREAD_STACK_MIN) ? \
PTHREAD_STACK_MIN * 2 : RUBY_STACK_MIN_LIMIT)
#else
#define RUBY_STACK_MIN (RUBY_STACK_MIN_LIMIT)
#endif
#define RUBY_STACK_MIN_SPACE RUBY_STACK_MIN/RUBY_STACK_SPACE_RATIO
#define RUBY_STACK_SPACE ((RUBY_STACK_MIN_SPACE > RUBY_STACK_SPACE_LIMIT) ? \
RUBY_STACK_SPACE_LIMIT : RUBY_STACK_MIN_SPACE)
#ifdef STACK_END_ADDRESS
extern void *STACK_END_ADDRESS;