Garbage collections

What is marker sweeper algorithm in garbage collection?

Questions by usguru   answers by usguru

Showing Answers 1 - 6 of 6 Answers

bh2008

  • Jun 30th, 2008
 

"Mark the unused object for garbage collection and collect it."
As per the algorithum there will be two thread.
One will mark all the unreferenced object for garbage collection and the other will reclaim the marked object memory.

Mark and Sweep garbage collection is 2 phase algorithm.In the first phase, it finds and marks all accessible objects recursively and in second phase it scans through the heap and reclaims all the unmarked objects.

Mark and sweep algo won't reclaim unrefenced objects immediately . It starts reclaiming when available memory exhausting.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions