@kesri
Nothing here yet.
Nothing here yet.
No blogs yet.
Hi Chetan Datta , thanks for effort and commitment, I would frame it in this manner, "Firstly, we mark the referenced objects in the Mark phase. followed by shifting/copying of the marked objects to appropriate survivor space and Then, the unmarked objects are removed to free up the memory." For the Mark, Copy & Sweep occurrence sequence, refer - Serial Garbage Collector in https://codecurated.com/blog/understanding-how-java-garbage-collector-works/ Thanks
https://www.geeksforgeeks.org/mark-and-sweep-garbage-collection-algorithm/ this one clearly states that, "In the Mark phase, we set the marked bit for all the reachable objects (or the objects which a user can refer to) to 1(true)." object that are reachable (i.e., referenced one) are marked and those who are not reachable from how could they be marked ?? In this context, marking mean making sure the object is reachable i.e, still referenced in the program. In the Garbage Collector/Working of Garbage Collector/1st Run of GC /Sweep I think it should be "Keep the marked objects and sweep the rest to the appropriate survivor space". Please share the reference/links you referred to write these, maybe that could help in getting on the same page. Chetan Datta