PTE · Reading · medium
There are some words missing in the following text. Select the most appropriate option for each blank.
In modern programming languages, automatic garbage collection relieves software developers from the burdensome and error-prone task of manual memory management. Instead of requiring explicit deallocation instructions, the runtime environment continuously ____ which dynamically allocated objects are still needed by executing programs. The most common approach, known as tracing garbage collection, determines viability through reachability analysis. The process begins at a set of base references, called garbage collection roots, which ____ local stack variables and active global pointers. The collector systematically traverses object references in a graph-like manner, marking every entity it can reach as active. Once this traversal phase is complete, the reclamation engine identifies any remaining objects that were not ____ during the trace. Because unreachable objects cannot influence subsequent program execution, the collector safely ____ their underlying memory addresses. To prevent fragmentation over time, many advanced engines then ____ surviving objects, relocating them into contiguous blocks so that future allocation requests proceed ____.