Well, common practise is to allocate most of the physical memory for java heap and let the GC to deal with it. Different GC algorithms will produce different pause times with different frequencies.
For your case, I think, it will be optimal to have old generation of objects living untouched most of the GCs. The rest of the heap is for young generation objects. GC can be made to occur more frequently if we collect only part of the young generation space: the oldest chunk of young generation at a time. There is a trade-off between portion of heap collected and GC frequency, of cause. Other techniques like the JIT's thread-local allocation can also help. -- Ivan On 9/14/06, Leo Li <[EMAIL PROTECTED]> wrote:
Dear Xiao-Feng: Thank you for your advice. I would like generational GC, but what I worry about whether it is preferrable to let GC start even if there is free memory existing. Although the initiative gc fits in my case, I do not know the side-effect of frequent gc, for example, to pick out gc-able objects, to merge memory and to reset pointers to moved objects, especially on other cases. In my opinion, the strategy of current passive gc still has its market. Is it possible to let it configurable for application developers to choose the gc strategy? Smatter compiler to allocate object on stack is really a good way since many a time an object is used as a local varaible. I think it is not so difficult for compiler to pick out local variables and what we need is just to let VM to allow space allocated on stack.:) I am not quite familiar with JIT, but it will become a powerful supplement for static analysis.
--------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]