From: KOSAKI Motohiro Date: 2013-03-05T10:42:57+09:00 Subject: [ruby-core:53132] Re: [ruby-trunk - Feature #8015][Open] [patch] tuneable HEAP_GROWTH_FACTOR The idea seems good. > + growth_factor_ptr = getenv("RUBY_HEAP_SLOTS_GROWTH_FACTOR"); > + if (growth_factor_ptr != NULL) { > + double growth_factor_f = atof(growth_factor_ptr); atof() don't have proper error check. it should be strtod(). > + if (RTEST(ruby_verbose)) > + fprintf(stderr, "growth_factor=%f (%f)\n", growth_factor_f, initial_growth_factor); > + if (growth_factor_f > 0) { > + initial_growth_factor = growth_factor_f; > + } This seems don't work when growth_factor_f is less than 1.