From: Eric Wong Date: 2018-02-06T02:13:44+00:00 Subject: [ruby-core:85431] Re: [Ruby trunk Feature#14370] Directly mark instruction operands and avoid mark_ary usage on rb_iseq_constant_body tenderlove@ruby-lang.org wrote: > https://gist.githubusercontent.com/tenderlove/f7fe6e09d6f9cacd3299abdd39fb65b7/raw/9b7dd3718278f7be0eb18bedf94590573e313ab2/resize_array.diff > Unfortunately this patch also made more calls to malloc / free > in order to allocate the smaller array. Maybe there is a way > to do this in-place? Not really. At least I do not recall malloc implementations being optimized for shrinking smaller allocations with realloc. For multi-page allocations, there's mremap(2), so it's not appropriate for most Ruby arrays (and also Linux-specific). Anyways, I like the rest of your changes to remove mark_ary and flagging markability. Unsubscribe: