<div dir="ltr">Hi,<div><br></div><div>in <a href="https://bea.gazelle.rocks/">my</a><a href="https://bea.gazelle.rocks"> application</a> I have about 800 MB of live objects. I know this because that's the used heap I get after running System.gc().</div><div><br></div><div>However, in normal operation (without calling System.gc()), heap use hovers around 3 GB out of 6 GB. I'm using G1.</div><div><br></div><div>So my question is - since the garbage collector is supposed to "race" the application threads anyway - can't it be made to "race to the end"? Meaning, until no or almost no dead objects remain?</div><div><br></div><div>I am totally fine with this potentially lowering the overall application or GC throughput; it's supposed to happen in irelatively (though not completely!) idle phases.</div><div><br></div><div>I really can't afford the seconds-long stop-the world pause of System.gc(). I just wish to put the regular backgruond GC on steroids for a few seconds until its job is done.</div><div><br></div><div>Reasons?</div><div><br>A. It just feels cleaner to have no more dead objects. (Gotta love the clean feeling!)<br>B. We find out how much heap we are actually using - no chance of that in normal operation.</div><div><br></div><div>Possible?</div><div><br></div><div>Many greetings</div><div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Stefan Reich<div>BotCompany.de // Java-based operating systems<br></div></div></div></div></div></div></div>