Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which of the following is a garbage collection technique?

a) Cleanup model
b) Mark and sweep model
c) Space management model
d) Sweep model

Answer: b
Explanation: A mark and sweep garbage collection consists of two phases, the mark phase and the sweep phase. In mark phase all the objects reachable by java threads, native handles and other root sources are marked alive and others are garbage. In sweep phase, the heap is traversed to find gaps between live objects and the gaps are marked free list used for allocating memory to new objects.

Join The Discussion