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
Shortening a binary filename has zero impact on the program's memory footprint or runtime memory consumption. The filename is metadata stored in the filesystem and does not affect how much RAM the executing program uses. Options A, B, and D are all legitimate approaches to address an out-of-memory crash: garbage collection prevents memory leaks, terminating other processes frees up available RAM, and upgrading hardware directly solves resource constraints.
Step-by-step Derivation:
Evaluate each option's effectiveness:
- A) Garbage collection: Directly addresses memory leaks by reclaiming unused heap memory. Effective.
- B) Terminate other processes: Frees system RAM for the target program. Effective.
- C) Shorten binary filename: Filename length is stored in filesystem metadata (typically 256 bytes max per name). It does NOT reduce the binary's loaded code size or runtime memory allocation. Ineffective.
- D) Upgrade RAM: Increases available memory directly. Effective.
Therefore, C is NOT an appropriate action.