summaryrefslogtreecommitdiff
path: root/ext/objspace/objspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/objspace/objspace.c')
-rw-r--r--ext/objspace/objspace.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 1889f11..5d585d6 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -639,9 +639,16 @@ iow_mark(void *ptr)
rb_gc_mark((VALUE)ptr);
}
+static size_t
+iow_size(const void *ptr)
+{
+ VALUE obj = (VALUE)ptr;
+ return memsize_of(obj);
+}
+
static const rb_data_type_t iow_data_type = {
"ObjectSpace::InternalObjectWrapper",
- {iow_mark, 0, 0,},
+ {iow_mark, 0, iow_size,},
};
static VALUE rb_mInternalObjectWrapper;