diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ext/objspace/objspace.c | 3 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Sat Oct 30 00:24:42 2010 Koichi Sasada <ko1@atdot.net> + + * ext/objspace/objspace.c (memsize_of): take care of + T_CLASS/const_tbl. + a patch from nagachika <nagachika00@gmail.com> [ruby-dev:42490] + Fri Oct 29 23:32:36 2010 Koichi Sasada <ko1@atdot.net> * test/profile_test_all.rb: added. diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c index e61ae3f21f..e61eda8ab9 100644 --- a/ext/objspace/objspace.c +++ b/ext/objspace/objspace.c @@ -69,6 +69,9 @@ memsize_of(VALUE obj) if (RCLASS(obj)->ptr->iv_tbl) { size += st_memsize(RCLASS(obj)->ptr->iv_tbl); } + if (RCLASS(obj)->ptr->const_tbl) { + size += st_memsize(RCLASS(obj)->ptr->const_tbl); + } size += sizeof(rb_classext_t); break; case T_STRING: |