diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-30 01:58:21 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-30 01:58:21 +0000 |
commit | 64270d3df28624de151b5d555e02b42b48c5b301 (patch) | |
tree | 5aa0456de592c701e2d63f08fcec96a7a2e73d09 /vm_core.h | |
parent | 32cfc7cefdc004895f76abf82ae62b53d200e424 (diff) |
merge revision(s) 32749:
* vm.c (th_init): preallocate alternative stack.
NoMemoryError is better than rb_bug, of course.
Patch by Eric Wong. [ruby-core:38572][ruby-core:38594].
* signal.c (rb_register_sigaltstack): ditto.
* vm_core.h: moved ALT_STACK_SIZE definition from signal.c.
* vm.c (thread_free): use xfree() instead of free().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -383,6 +383,12 @@ struct rb_unblock_callback { struct rb_mutex_struct; +#ifdef SIGSTKSZ +#define ALT_STACK_SIZE (SIGSTKSZ*2) +#else +#define ALT_STACK_SIZE (4*1024) +#endif + typedef struct rb_thread_struct { VALUE self; rb_vm_t *vm; |