ITPEC FE Morning October 2019 Question 17

Topic: Software

Which of the following is an appropriate explanation of a memory leak?

Explanation

Memory reserved but never released because of a bug, so usable memory shrinks — that is a memory leak.

A program or the OS allocates memory while running and, because of a bug, loses track of it without freeing it. The memory stays reserved though nothing uses it, so free memory shrinks the longer the program runs, until performance drops or allocation fails. Restarting the process gives the memory back; fixing the bug stops the leak.

Answer (c)

Why not others:

  • •(a) — thrashing: too little main memory for the programs running, so the system spends its time paging
  • •(b) — overlay: loading the modules a program needs into the same area in turn when the whole program does not fit
  • •(d) — fragmentation: enough free memory in total, but split into pieces too small for a large program; compaction fixes it

Key rule: A leak is memory never returned, fragmentation is memory returned but scattered, and thrashing is too little memory, so paging dominates.

Software · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.