Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 71310 invoked from network); 14 Sep 2006 19:14:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Sep 2006 19:14:59 -0000 Received: (qmail 83588 invoked by uid 500); 14 Sep 2006 19:14:52 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 83548 invoked by uid 500); 14 Sep 2006 19:14:52 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 83535 invoked by uid 99); 14 Sep 2006 19:14:52 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2006 12:14:52 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=ivan.volosyuk@gmail.com; domainkeys=good X-ASF-Spam-Status: No, hits=0.4 required=5.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from ([64.233.182.188:6218] helo=nf-out-0910.google.com) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 71/20-07023-ED9A9054 for ; Thu, 14 Sep 2006 12:14:49 -0700 Received: by nf-out-0910.google.com with SMTP id c29so1954283nfb for ; Thu, 14 Sep 2006 12:13:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k27Mf1u04SBTeV3GlV5A7BQDmVtcqQYB2LTrvuFQEV3nwntuyJEDpQsPgKK+DchehSbEnbOAyKj13KbwVWszuVm49gYZfljO+MR5iir0X9U3l+wVJwhLobfgm4t1qxzsLi6xagE7HqOEWOaksXLNYyLztJSMowFV67gTCT7Gadg= Received: by 10.49.29.2 with SMTP id g2mr12484676nfj; Thu, 14 Sep 2006 12:13:30 -0700 (PDT) Received: by 10.49.67.14 with HTTP; Thu, 14 Sep 2006 12:13:30 -0700 (PDT) Message-ID: <12385bbd0609141213v42762762gcac8d3ff48434be7@mail.gmail.com> Date: Thu, 14 Sep 2006 23:13:30 +0400 From: "Ivan Volosyuk" To: harmony-dev@incubator.apache.org Subject: Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9623c9a50609132353k49ed4fei18b634bf1e074212@mail.gmail.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 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: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org