diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-15 04:09:24 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-15 04:09:24 +0000 |
commit | 4f131139456edc120612b7264619042fc698f08c (patch) | |
tree | 4df81355a26a4a2ad1469c13c37244c99a84e6ec /vm.c | |
parent | 8063edd4c941dd32e8760307c0d56493015dfae8 (diff) |
* vm_core.h (rb_thread_t): new member machine_stack_maxsize and
machine_register_stack_maxsize.
* gc.c (rb_gc_stack_maxsize): new global variable for the thread size
of the main thread.
(STACK_LEVEL_MAX): use machine_stack_maxsize of current thread.
(ruby_stack_check): check IA64 register stack.
(ruby_set_stack_size): set rb_gc_stack_maxsize.
(Init_stack): set rb_gc_stack_maxsize.
* thread_pthread.ci (native_thread_create): initialize
th->machine_stack_maxsize and th->machine_register_stack_maxsize.
* vm.c (Init_BareVM): initialize th->machine_stack_maxsize and
th->machine_register_stack_maxsize.
* thread_win32.ci (native_thread_create): initialize
th->machine_stack_maxsize. not tested. just a guess at all.
[ruby-dev:32604]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1738,6 +1738,7 @@ rb_thread_alloc(VALUE klass) VALUE insns_name_array(void); extern VALUE *rb_gc_stack_start; +extern size_t rb_gc_stack_maxsize; #ifdef __ia64 extern VALUE *rb_gc_register_stack_start; #endif @@ -1872,8 +1873,11 @@ Init_BareVM(void) th_init2(th); th->vm = vm; th->machine_stack_start = rb_gc_stack_start; + th->machine_stack_maxsize = rb_gc_stack_maxsize; #ifdef __ia64 th->machine_register_stack_start = rb_gc_register_stack_start; + th->machine_stack_maxsize /= 2; + th->machine_register_stack_maxsize = th->machine_stack_maxsize; #endif rb_thread_set_current_raw(th); } |