From: Stefan Kaes Date: 2005-07-14T15:02:18+09:00 Subject: Re: GC tweak --------------060806040908000405040309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit nobu.nokada@softhome.net wrote: >>+static void set_gc_parameters() >>+{ >>+ char* min_slots_ptr = getenv("RUBY_HEAP_MIN_SLOTS"); >>+ if (min_slots_ptr != NULL) { >>+ int min_slots_i = atoi(min_slots_ptr); >>+ if (min_slots_i > 0) { >>+ heap_slots = min_slots_i; >>+ heap_min_slots = min_slots_i; >>+ } >>+ } >>+ char* free_min_ptr = getenv("RUBY_HEAP_FREE_MIN"); >> >> > >This is disallowed in C89. > > > I'm a bit curious what exactly is disallowed? Is it the late declaration of free_min_ptr? Or is it int min_slots_i = atoi(min_slots_ptr)? It's been along time since I had to use a c89 compiler :-) >And in 1.9, stdio is not used in other places, so you may want >to flush stderr after fprintf. > > OK. But I was more interested to hear an opinion on the nature of the patch. And whether something like that could be included in 1.8.3 and 1.9. Not everyone has the chance to recompile in the environment in which his server apps are runnning. And most ISPs are reluctant to apply patches, which aren't official. -- Stefan --------------060806040908000405040309--