ruby-changes:40338
From: normal <ko1@a...>
Date: Sun, 1 Nov 2015 11:14:01 +0900 (JST)
Subject: [ruby-changes:40338] normal:r52419 (trunk): iseq.c (iseq_memsize): account for rb_call_cache entries
normal 2015-11-01 11:13:54 +0900 (Sun, 01 Nov 2015) New Revision: 52419 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52419 Log: iseq.c (iseq_memsize): account for rb_call_cache entries Add some comments to clarify the allocated field used for the allocations while we're at it. TODO: figure out a better way of testing/maintaining this... Modified files: trunk/ChangeLog trunk/iseq.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52418) +++ ChangeLog (revision 52419) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Nov 1 11:07:31 2015 Eric Wong <e@8...> + + * iseq.c (iseq_memsize): account for rb_call_cache entries + Sun Nov 1 09:12:10 2015 Nobuyoshi Nakada <nobu@r...> * parse.y (parser_yylex): ':' separated by a comment and a newline Index: iseq.c =================================================================== --- iseq.c (revision 52418) +++ iseq.c (revision 52419) @@ -174,10 +174,18 @@ iseq_memsize(const rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/iseq.c#L174 } 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/