Concept:
Dynamic memory management involves requesting memory from the heap during runtime.
• malloc(): A function in C/C++ used to allocate a block of memory.
• free(): A function used to release that memory back to the system.
Step 1: Identifying the problem.
When a programmer uses $malloc()$ to reserve memory but fails to call $free()$ when the memory is no longer needed, that memory remains "occupied" even though the program may no longer have a pointer to access it.
Step 2: Analyzing the cumulative effect.
If the program runs repeatedly or contains a loop that continues to allocate memory without releasing it, the amount of available system memory steadily decreases. This phenomenon is called a Memory Leak.
Step 3: Differentiating from other terms.
• Deadlock: A situation where two processes are waiting for each other to release resources.
• Thrashing: Excessive paging/swapping that slows down the system.
• Starvation: A process is perpetually denied necessary resources to process its work.
None of these specifically describe the loss of available memory due to unreleased allocations.