Difficulty: Easy
Correct Answer: garbage
Explanation:
Introduction / Context:
Languages with automatic or manual memory management often accumulate unreachable or obsolete data. Recognizing the correct term for such memory helps in understanding garbage collection and resource reclamation strategies.
Given Data / Assumptions:
Concept / Approach:
Unreachable or unused memory is called garbage. Garbage collectors traverse the object graph to find reachable objects and reclaim memory from everything else. In manual memory management, developers must free such memory explicitly to avoid leaks.
Step-by-Step Solution:
Verification / Alternative check:
Standard textbooks and language specifications (Java, .NET, Lisp) define “garbage” as memory eligible for collection because it is not reachable by any thread of control.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing “invalid” with “dangling pointers,” where memory is freed but references remain; that is the opposite and leads to unsafe access. Garbage implies no references remain.
Final Answer:
garbage
Discussion & Comments