summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ext/objspace/objspace.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6dcd71299a8..b1dd59a4b02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 e61ae3f21f7..e61eda8ab94 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: