summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-29 15:29:16 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-29 15:29:16 +0000
commit0a0c6572856431d822e76348bd2c0f0933b537e0 (patch)
tree71616cc665e43b9645009880f254b4f430e6d1b3 /ext
parent32623a16276b8c99a8c142c570cb2f50dc3df737 (diff)
* ext/objspace/objspace.c (memsize_of): take care of
T_CLASS/const_tbl. a patch from nagachika <nagachika00@gmail.com> [ruby-dev:42490] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/objspace/objspace.c3
1 files changed, 3 insertions, 0 deletions
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: