Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Controlling the Garbage Collector Date: Mon, 18 Jun 2012 04:32:15 -0700 (PDT) Organization: http://groups.google.com Lines: 19 Message-ID: <2f2646f4-a3ee-49c5-bc2d-1b44ef91d28c@googlegroups.com> References: <6KSdnTwztJvtR0bSnZ2dnUVZ_t-dnZ2d@giganews.com> <_JmdnUu_Z-scJEHSnZ2dnUVZ_t6dnZ2d@giganews.com> NNTP-Posting-Host: 193.0.246.21 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1340019136 31313 127.0.0.1 (18 Jun 2012 11:32:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 18 Jun 2012 11:32:16 +0000 (UTC) In-Reply-To: <_JmdnUu_Z-scJEHSnZ2dnUVZ_t6dnZ2d@giganews.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.0.246.21; posting-account=MGO7qgoAAABvyo26eHVDO00044spH-ws User-Agent: G2/1.0 X-Received-Bytes: 2166 Xref: csiph.com comp.lang.java.programmer:15376 On Saturday, June 16, 2012 6:51:13 PM UTC+2, Aaron W. Hsu wrote: > On Fri, 15 Jun 2012 21:37:32 -0400, Eric Sosman wrote: > > > Even if the thread you're interested in is careful not to create new > > object instances, object creation in other threads can trigger the > > garbage collector at pretty much any time. > > The garbage collector is one of the reasons that I have hesitated to move > to Java. In some languages (Chez Scheme) I can get quite explicit > control over when and how garbage collection occurs, which can make it > possible to do very fine grained things to avoid some of the corner case > problems that can manifest in garbage collected languages. Usually this > is not a problem at all, but I would like to have the control nonetheless. Be sure to try out G1 collector. In my brief tests so far it worked pretty well with regard to the target timings albeit at the expense of a bit of CPU overhead. Kind regards robert