Modeling memory use of applications
AssigneeInternational Business Machines Corporation
InventorsRoee Hay, Omer Tripp
Life of this patent
Estimating the term…
Abstract
A method includes receiving a program code at a processor. The method also includes generating, via the processor, a heap model corresponding to the program code. The method further includes detecting, via the processor, a linearizable data structure in the program code. The method also further includes modifying, via the processor, the heap model based on the detected linearizable data structure. The method also further includes analyzing, via the processor, the program code using the modified heap model.
Claims9
A method for analyzing a program source code, the method comprising:
- receiving the program source code at a processor;
- generating, via the processor performing a static analysis of the program source code, a heap model corresponding to the program source code, wherein the heap model comprises object allocation sites;
- detecting, via the processor performing the static analysis of the program source code, a linearizable data structure in the program source code, wherein at least one of the object allocation sites is associated with the linearizable data structure;
- modifying, via the processor performing the static analysis of the program source code, the heap model, wherein the modifying the heap model is based on the detecting the linearizable data structure, and wherein the modifying the heap model comprises removing, from the heap model, an object allocation site included in the at least one of the object allocation sites associated with the linearizable data structure;
- and
- analyzing the program source code via the processor performing the static analysis of the program source code using the modified heap model.
A method for analyzing a program source code, the method comprising:
- receiving the program source code at a processor;
- generating, via the processor performing a static analysis of the program source code, a heap model corresponding to the program source code, wherein the heap model comprises object access paths;
- detecting, via the processor performing the static analysis of the program source code, a linearizable data structure in the program source code, wherein at least one of the object access paths is associated with the linearizable data structure;
- modifying, via the processor performing the static analysis of the program source code, the heap model based on the detecting the linearizable data structure, wherein the modifying the heap model comprises replacing a first object access path and a first pointer, wherein the first object access path is included in the at least one of the object access paths associated with the linearizable data structure, wherein replacing the first access path comprises replacing, in the modified heap model, the first access path with an interface of the linearizable data structure, wherein the first pointer points inside the linearizable data structure and a second pointer points to an interface of the linearizable data structure, and wherein replacing the first pointer comprises replacing, in the modified heap model, the first pointer with the second pointer;
- and
- analyzing the program source code via the processor performing the static analysis of the program source code with the modified heap model.
Dependencies are inferred from the claim text.