tag:blogger.com,1999:blog-8712770457197348465.post9157932173797660888..comments2024-03-17T23:01:26.872-07:00Comments on Javarevisited: How Garbage Collection works in Java? Explainedjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger88125tag:blogger.com,1999:blog-8712770457197348465.post-76067594935967090692017-11-22T23:11:21.181-08:002017-11-22T23:11:21.181-08:00Well written, clearly explain. Thank you :) Well written, clearly explain. Thank you :) Anonymoushttps://www.blogger.com/profile/17612505128505340746noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-23170062296989086842017-11-09T05:36:20.243-08:002017-11-09T05:36:20.243-08:00i never saw such a clean explanation. about any to...i never saw such a clean explanation. about any topic.<br />Thankyou again<br />Anonymoushttps://www.blogger.com/profile/13546124429741052034noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-77857406032978305822017-11-09T05:35:24.403-08:002017-11-09T05:35:24.403-08:00your blog is owesome brother keep it up.your blog is owesome brother keep it up.Anonymoushttps://www.blogger.com/profile/13546124429741052034noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-29133609528826341142017-07-19T05:17:31.179-07:002017-07-19T05:17:31.179-07:00@Sudip and @Adam, yes, I need to update this artic...@Sudip and @Adam, yes, I need to update this article, with respect to removal of PermGen space in Java 8 and introduction of MetaSpace. Also, I need to add some more information on G1 garbage collector, that's on my TODO list. Thanks for your input and attention guys. Thanksjavin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-36099829113991140092017-07-19T03:10:34.589-07:002017-07-19T03:10:34.589-07:00Obviously Javin's blog entries are getting so ...Obviously Javin's blog entries are getting so numerous he sometimes misses an update - but here is the update, just somewhere else: http://javarevisited.blogspot.co.uk/2016/07/difference-in-string-pool-between-java6-java7.htmlAdam Hardyhttps://www.blogger.com/profile/10067055109670179234noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-71867016168228271812016-10-18T21:23:37.861-07:002016-10-18T21:23:37.861-07:00@Javin : If possible please update this post refle...@Javin : If possible please update this post reflecting Java 8 memory model, especially substitution of PermGen with MetaSpace.Anonymoushttps://www.blogger.com/profile/02655016739265042406noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-86371175018245960522016-09-22T08:09:51.065-07:002016-09-22T08:09:51.065-07:00Excellent explanation.....Excellent explanation.....Anonymoushttps://www.blogger.com/profile/03010171646737652786noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-15290058080281385092016-03-29T23:06:49.672-07:002016-03-29T23:06:49.672-07:00I was looking for a tool that can help me to under...I was looking for a tool that can help me to understand the GC log in a graphical way and this tool http://gceasy.io has given the exact functionalities that I was looking for.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-63118957606100250002015-12-08T09:39:36.777-08:002015-12-08T09:39:36.777-08:00How does Java Garbage Collection work? Short answe...How does Java Garbage Collection work? Short answer: it doesn't. EVER.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-79845687955163420572015-11-02T15:49:33.540-08:002015-11-02T15:49:33.540-08:00Hi, I would really appreciate if someone will expl...Hi, I would really appreciate if someone will explain how the concepts above changed since Java 8 introduced Metaspace instead of the PermGen.<br /> Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-52825884761790685932015-07-31T08:56:47.855-07:002015-07-31T08:56:47.855-07:00@Manish Sahu, its not guaranteed but it does clean...@Manish Sahu, its not guaranteed but it does cleanup every time you call it. What Java tells you that you cannot build your solution based upon that method, garbage collection should be left to Garbage collector. If you use Eclipse, you can see that GC collector icon at bottom right, that use this method to run GC and free memory.javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-55902040490034905372015-07-31T00:52:31.354-07:002015-07-31T00:52:31.354-07:00What is the use of gc() method if there is no guar...What is the use of gc() method if there is no guarantee of garbage collection ?<br />in which condition we should call it ? Manilhttps://www.blogger.com/profile/04837836266299211381noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-38930773807327149552014-06-12T04:19:16.002-07:002014-06-12T04:19:16.002-07:00Hi,
I have one doubt. I am beginner.I am not under...Hi,<br />I have one doubt. I am beginner.I am not understood if Object A has reference of object B and object B has reference of Object A then how both Objects A and B will be eligible for Garbage collection?<br />Ex:If we take Some class like<br /><br />S a=new S();<br />S b=new S();<br />S t=b;<br />b=a;<br />a=t;<br />t=null; <br />Still a pointing b and b pointing a. Then how a and b both Anonymoushttps://www.blogger.com/profile/03676643122910350135noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-73966980287973641312014-05-22T23:44:52.617-07:002014-05-22T23:44:52.617-07:00Hi,
For example if 10 objects are eligible for G...Hi, <br /><br />For example if 10 objects are eligible for GC, then which object will get first GC? in what basis it will assign.<br /><br />Thanks<br />Kamal Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-27964806859115600402014-03-26T19:32:58.756-07:002014-03-26T19:32:58.756-07:00How long Garbage Collection takes to complete? We ...How long Garbage Collection takes to complete? We are seeing pause time upto 4 to 5 seconds in our Java application? is this normal? Our heap size is not very large and its somewhere around 2 to 4 GB.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-1865048171169526212014-02-07T13:39:40.248-08:002014-02-07T13:39:40.248-08:00What is the condition for garbage collector to sta...What is the condition for garbage collector to start? When does it start in your application? There are some conditions that trigger the start of garbage collector-what are they?ABCnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-60715802797656135562014-01-20T22:58:36.449-08:002014-01-20T22:58:36.449-08:00oncurrent-Mark-Sweep collector is most popular gar...oncurrent-Mark-Sweep collector is most popular garbage collector of Java. CMS collector is popular for its better throughput and less pause time. Because for many applications, end-to-end throughput is not as important as fast response time. For example gaming applications need fast response time to make their gaming experience better, if any game hang for a second only, it lost its charm. As youAnonymoushttps://www.blogger.com/profile/02391395071140740284noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-43051173300879548282013-08-13T01:29:14.793-07:002013-08-13T01:29:14.793-07:00went through some other links...but this is only o...went through some other links...but this is only one provides the necessary info which i was looking for. Thank you for very clear, straight nd simple explanation.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-91201453790221612042013-07-17T12:08:21.738-07:002013-07-17T12:08:21.738-07:00gc() runs the finalization methods of any objects ...gc() runs the finalization methods of any objects pending finalization.<br /> Calling this method suggests that the Java virtual machine expend<br /> effort toward running the finalize methods of objects<br /> that have been found to be discarded but whose finalize<br /> methods have not yet been run. When control returns from the<br /> method call, the virtual machine has made a best effort to<narenhttps://www.blogger.com/profile/12861159489373402101noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-34737637436462698892013-07-16T08:41:21.587-07:002013-07-16T08:41:21.587-07:001) stop abusing the HEAP
2) stop using lesser plat...1) stop abusing the HEAP<br />2) stop using lesser platform like Java for critical production systems<br />3) stop making garbage to start with. learn the damn C/C++pip010https://www.blogger.com/profile/01451646330176713157noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-92165272003491858392013-06-29T16:13:58.146-07:002013-06-29T16:13:58.146-07:00From Java 7. String Pool is moved to the Heap.
htt...From Java 7. String Pool is moved to the Heap.<br />http://stackoverflow.com/a/14194112Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-15968130577142725322013-06-24T22:51:18.366-07:002013-06-24T22:51:18.366-07:00How many object are elligible for garbage collecti...How many object are elligible for garbage collection for below program:<br /><br />class A{<br />}<br /><br />class B extends A{<br />public static void main(String a[]){<br />B b =new B();<br />B b1= new B();<br /><br />b=b1;<br /><br />}<br />}<br /><br />As this is falls under inheritance, how many object are eligible for garbage collection?<br /><br />Thanks!Teenshttps://www.blogger.com/profile/01807790204793916376noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-25856378412604211522013-05-31T15:53:50.014-07:002013-05-31T15:53:50.014-07:00Hi i have some questions related to GC
1. GC give...Hi i have some questions related to GC<br /><br />1. GC give guarantee that object will be removed ?<br />2. What happens when GC call finalize() methhod , and why it calls ?<br />3. And the last one , difference regions of heap space , i cant understand that regions ? <br /><br />Thanks ! Anonymoushttps://www.blogger.com/profile/17258604688827948875noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-42230019397225634222013-03-14T21:26:20.032-07:002013-03-14T21:26:20.032-07:00@Javin
...When an object first created in heap its...@Javin<br />...When an object first created in heap its gets created in new generation inside Eden space and after subsequent Minor Garbage collection if object survives its gets moved to survivor 1 and then Survivor 2 before Major Garbage collection moved that object to Old or tenured generation... needs a little bit of correction.<br />Young generation divided into three parts eden, From Space(Anonymoushttps://www.blogger.com/profile/05233928276465617609noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-37067784797821201192012-11-02T04:46:26.528-07:002012-11-02T04:46:26.528-07:00Hi. In my project recently getting problem with Co...Hi. In my project recently getting problem with Connection hits to DB, As we are closing properly bt still some where its giving the problem while asking db dba he told that lot of connections are open. pls let us know the thing. this is happening with WAPT tool while testing the app for performance. could you please tell me to test my code for connection failuer scenarios and gc possible code.Anonymousnoreply@blogger.com