aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--iseq.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b58aebdafa..0b88dcb567 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Nov 1 11:07:31 2015 Eric Wong <e@80x24.org>
+
+ * iseq.c (iseq_memsize): account for rb_call_cache entries
+
Sun Nov 1 09:12:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (parser_yylex): ':' separated by a comment and a newline
diff --git a/iseq.c b/iseq.c
index 6b243feb7e..b1f05a2d62 100644
--- a/iseq.c
+++ b/iseq.c
@@ -174,10 +174,18 @@ iseq_memsize(const rb_iseq_t *iseq)
}
size += (body->param.opt_num + 1) * sizeof(VALUE);
size += param_keyword_size(body->param.keyword);
+
+ /* body->is_entries */
size += body->is_size * sizeof(union iseq_inline_storage_entry);
+
+ /* body->ci_entries */
size += body->ci_size * sizeof(struct rb_call_info);
size += body->ci_kw_size * sizeof(struct rb_call_info_with_kwarg);
+ /* body->cc_entries */
+ size += body->ci_size * sizeof(struct rb_call_cache);
+ size += body->ci_kw_size * sizeof(struct rb_call_cache);
+
if (ci_kw_entries) {
unsigned int i;