summaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-11 20:12:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-11 20:12:56 +0000
commit203bbf105530c74d134ad78ec536767b15a86017 (patch)
tree33558b021cf0f4ec2c2741278fc33868ef16e39b /thread_pthread.c
parent7f3563c06a29911ba49ce6a2a4ea74e452c98c7e (diff)
downloadruby-203bbf105530c74d134ad78ec536767b15a86017.tar.gz
ruby-203bbf105530c74d134ad78ec536767b15a86017.tar.xz
ruby-203bbf105530c74d134ad78ec536767b15a86017.zip
* thread_pthread.c (ruby_init_stack): range of rlim_cur may be
larger than int. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 91c5b42d6..11a70d77a 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -292,10 +292,10 @@ ruby_init_stack(VALUE *addr
struct rlimit rlim;
if (getrlimit(RLIMIT_STACK, &rlim) == 0) {
- unsigned int space = rlim.rlim_cur/5;
+ size_t space = (size_t)(rlim.rlim_cur/5);
if (space > 1024*1024) space = 1024*1024;
- native_main_thread.stack_maxsize = rlim.rlim_cur - space;
+ native_main_thread.stack_maxsize = (size_t)rlim.rlim_cur - space;
}
}
#endif