From: Brent Roman Date: 2008-01-12T01:09:20+09:00 Subject: Re: 1.8.6 gc.c thoughts Roger, Can't help you with the HEAP_SLOTS issue, but I did post about the strange equation for malloc_increase and malloc_limit a while back: http://www.nabble.com/-PATCH--Limit-Ruby-1.8.6-process-size-to13713127.html#a13713127 I looked to me like an attempt to lessen the frequency of GC mark/sweep passes. It was entirely too successful at that :-) Does anyone recall what could cause malloc_limit to decrease? - brent Roger Pack wrote: > > > On another point, I have a question on this line of code, run at the end > of > garbage collection: > if (malloc_increase > malloc_limit) { > malloc_limit += (malloc_increase - malloc_limit) * (double)live / > (live > + freed); // this line > if (malloc_limit < GC_MALLOC_LIMIT) malloc_limit = GC_MALLOC_LIMIT; > } > > I haven't checked this, but it seems to me that It seems to me that > (malloc_increase - malloc_limit) will always be a very small number (?) > which may not be what was expected. I could be wrong. In reality I think > what it should best do is > malloc_limit = GC_MALLOC_LIMIT * > percent_of_recent_allocated_memory_that_was_freed // allow the > malloc_limit > to change dynamically, maybe with a fixed maximum. I could code it up. > > Anyway just bouncing back some thoughts. > Ruby rox. > -- > -Roger Pack > > -- View this message in context: http://www.nabble.com/1.8.6-gc.c-thoughts-tp13491288p14759517.html Sent from the ruby-core mailing list archive at Nabble.com.