mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (obj_memsize_of): don't calculate memsize of T_NODE
when called from check_gen_consistency. It fixes segmentation fault on RGENGC_CHECK_MODE >= 1 introduced by r47188. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b62ce0e964
commit
6bce41b3b7
2 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Sun Aug 17 19:41:40 2014 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||
|
||||
* gc.c (obj_memsize_of): don't calculate memsize of T_NODE
|
||||
when called from check_gen_consistency. It fixes segmentation
|
||||
fault on RGENGC_CHECK_MODE >= 1 introduced by r47188.
|
||||
|
||||
Sun Aug 17 17:08:12 2014 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* ext/win32ole/win32ole.c (ole_invoke): use RHASH_SIZE instead of
|
||||
|
|
8
gc.c
8
gc.c
|
@ -690,7 +690,7 @@ static void gc_mark(rb_objspace_t *objspace, VALUE ptr);
|
|||
static void gc_mark_maybe(rb_objspace_t *objspace, VALUE ptr);
|
||||
static void gc_mark_children(rb_objspace_t *objspace, VALUE ptr);
|
||||
|
||||
static size_t obj_memsize_of(VALUE obj, int use_tdata);
|
||||
static size_t obj_memsize_of(VALUE obj, int use_all_types);
|
||||
static VALUE gc_verify_internal_consistency(VALUE self);
|
||||
|
||||
static double getrusage_time(void);
|
||||
|
@ -2497,7 +2497,7 @@ size_t rb_generic_ivar_memsize(VALUE);
|
|||
#include "regint.h"
|
||||
|
||||
static size_t
|
||||
obj_memsize_of(VALUE obj, int use_tdata)
|
||||
obj_memsize_of(VALUE obj, int use_all_types)
|
||||
{
|
||||
size_t size = 0;
|
||||
|
||||
|
@ -2557,7 +2557,7 @@ obj_memsize_of(VALUE obj, int use_tdata)
|
|||
}
|
||||
break;
|
||||
case T_DATA:
|
||||
if (use_tdata) size += rb_objspace_data_type_memsize(obj);
|
||||
if (use_all_types) size += rb_objspace_data_type_memsize(obj);
|
||||
break;
|
||||
case T_MATCH:
|
||||
if (RMATCH(obj)->rmatch) {
|
||||
|
@ -2590,7 +2590,7 @@ obj_memsize_of(VALUE obj, int use_tdata)
|
|||
break;
|
||||
|
||||
case T_NODE:
|
||||
size += rb_node_memsize(obj);
|
||||
if (use_all_types) size += rb_node_memsize(obj);
|
||||
break;
|
||||
|
||||
case T_STRUCT:
|
||||
|
|
Loading…
Add table
Reference in a new issue