Memory leaks are NOT found by static analysis - Introduction of Software Engineering

Q.  What can static analysis NOT find?
- Published on 24 Jul 15

a. The use of a variable before it has been defined.
b. Unreachable (“dead”) code.
c. Memory leaks.
d. Array bound violations.

ANSWER: Memory leaks.
 

    Discussion

  • Nirja Shah   -Posted on 09 Oct 15
    Static analysis
    - It is the analysis of computer software that is performed without actually executing programs (analysis performed on executing programs is known as dynamic analysis).
    - In most cases the analysis is performed on some version of the source code, and in the other cases, some form of the object code.
    - The term is usually applied to the analysis performed by an automated tool, with human analysis being called program understanding, program comprehension, or code review.
    - Software inspections and Software walkthroughs are also used in the latter case.

    Memory leaks
    - It is the gradual loss of available computer memory when a program (an application or part of the operating system) repeatedly fails to return memory that it has obtained for temporary use.
    - As a result, the available memory for that application or that part of the operating system becomes exhausted and the program can no longer function.
    - For a program that is frequently opened or called or that runs continuously, even a very small memory leak can eventually cause the program or the system to terminate.
    - A memory leak is the result of a program bug.

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)