diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-13 05:19:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-13 05:19:01 +0000 |
commit | 847786069403bce010d42e0da6f6b80223dd02b9 (patch) | |
tree | a70f9a04f63b014a08ff54acb19bd8d2829c1f86 | |
parent | 97c8c1fa0e2770973c5911ef24708d13fb8a34b4 (diff) | |
download | ruby-847786069403bce010d42e0da6f6b80223dd02b9.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gc.c | 5 |
2 files changed, 7 insertions, 3 deletions
@@ -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 @@ -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; |