From: Eric Wong Date: 2014-09-09T09:55:25+00:00 Subject: [ruby-core:64893] Re: [ruby-trunk - Feature #10187] minor iseq memory reductions ko1@atdot.net wrote: > > > + if (newsize > INT_MAX) rb_memerror(); > > memerror? I took the hint from compile_data_alloc: if (size >= INT_MAX) rb_memerror(); if (storage->pos + size > storage->size) { unsigned int alloc_size = storage->size; while (alloc_size < size) { if (alloc_size >= INT_MAX / 2) rb_memerror(); alloc_size *= 2; Nobody hits the limit, so reusing rb_memerror keeps code size down.