A binary program failed to run because it crashed due to lack of memory.
Accenture technical mcq question with a worked answer. Free to practise - no sign-up.
A binary program failed to run because it crashed due to lack of memory. Which of the following is NOT an appropriate action to solve this issue?
Show answer & explanation
The filename of a binary has no impact on the program's runtime memory consumption. Renaming a file does not reduce the memory footprint of the executing program. Options A, B, and D are all valid approaches: garbage collection addresses memory leaks, terminating other processes frees available RAM, and upgrading to more RAM directly solves the capacity problem.
Step-by-step Derivation:
To identify the incorrect action, evaluate each option's relevance to runtime memory management:
- Option A: Garbage collection actively manages heap memory and reclaims unreferenced objects, directly addressing memory efficiency and leaks.
- Option B: Terminating concurrent processes reduces competition for available RAM, freeing memory for the target program.
- Option D: Adding more physical RAM increases the total available memory, eliminating the shortage.
- Option C: A filename is metadata stored in the filesystem and does not affect the binary's loaded size in memory or its runtime memory allocation. Whether the file is named 'program.bin' or 'p.bin' makes no difference to memory usage during execution.
Therefore, C is the NOT appropriate action.