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

* gc.c (ruby_stack_check): STACK_LENGTH should be less than

STACK_LEVEL_MAX.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-06-13 05:19:01 +00:00
parent 97c8c1fa0e
commit 8477860694
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Fri Jun 13 14:18:54 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (ruby_stack_check): STACK_LENGTH should be less than
STACK_LEVEL_MAX.
Fri Jun 13 12:55:37 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* enum.c (sort_by_i): use NODE_DOT2 instead of NODE_MEMO to avoid

5
gc.c
View file

@ -236,7 +236,6 @@ rb_objspace_alloc(void)
/*#define HEAP_SIZE 0x800 */
#define HEAP_OBJ_LIMIT (HEAP_SIZE / sizeof(struct RVALUE))
#define FREE_MIN 4096
extern st_table *rb_class_tbl;
VALUE *rb_gc_stack_start = 0;
@ -818,11 +817,11 @@ ruby_stack_check(void)
int ret;
rb_thread_t *th = GET_THREAD();
SET_STACK_END;
ret = STACK_LENGTH > STACK_LEVEL_MAX + GC_WATER_MARK;
ret = STACK_LENGTH > STACK_LEVEL_MAX - GC_WATER_MARK;
#ifdef __ia64
if (!ret) {
ret = (VALUE*)rb_ia64_bsp() - th->machine_register_stack_start >
th->machine_register_stack_maxsize/sizeof(VALUE) + GC_WATER_MARK;
th->machine_register_stack_maxsize/sizeof(VALUE) - GC_WATER_MARK;
}
#endif
return ret;