Tracking of program objects during request processing
AssigneeSap SE
InventorMartin Moser
Life of this patent
Estimating the term…
Abstract
Coding issues that create runtime memory leaks, for example in programs coded in a platform-independent programming language such as Java™, can be isolated at the program code line level. An allocation trace that retains, in active memory, a unique object identifier for each of a plurality of objects instantiated during program execution and an address in the active memory where each object is stored can be created. Memory leak candidates can be identified by directly examining contents of the active memory to identify one or more data structures that are increasing in size over time. The allocation trace can be combined with the identified memory leak candidates to generate information about at least one identified leaking object.
Claims19
A computer program product comprising a machine-readable medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
- creating an allocation trace for a running program that is suspected of causing or known to cause memory leaks, the creating comprising retaining, in active memory, a unique object identifier for each of a plurality of objects instantiated during program execution and an address in the active memory where each object is stored;
- identifying at least one memory leak candidate, the identifying comprising directly examining contents of the active memory to identify one or more data structures that are increasing in size over time;
- generating information about an identified leaking object, the generating comprising extracting the plurality of objects from the allocation trace as extracted candidate objects, determining for each candidate extracted object of the plurality of candidate objects whether the extracted candidate object is one of the at least one memory leak candidate, and identifying the extracted candidate object as the identified leaking object;
- and
- promoting the information about the identified leaking object.
A system comprising:
- at least one programmable processor;
- and
- a machine-readable medium storing instructions that, when executed by the at least one processor, cause the at least one programmable processor to perform operations comprising:
- creating an allocation trace for a running program that is suspected of causing or known to cause memory leaks, the creating comprising retaining, in active memory, a unique object identifier for each of a plurality of objects instantiated during program execution and an address in the active memory where each object is stored;
- identifying at least one memory leak candidate, the identifying comprising directly examining contents of the active memory to identify one or more data structures that are increasing in size over time;
- generating information about an identified leaking object, the generating comprising extracting the plurality of objects from the allocation trace as extracted candidate objects, determining for each candidate extracted object of the plurality of candidate objects whether the extracted candidate object is one of the at least one memory leak candidate, and identifying the extracted candidate object as the identified leaking object;
- and
- promoting the information about the identified leaking object.
A computer-implemented method comprising:
- creating an allocation trace for a running program that is suspected of causing or known to cause memory leaks, the creating comprising retaining, in active memory, a unique object identifier for each of a plurality of objects instantiated during program execution and an address in the active memory where each object is stored;
- identifying at least one memory leak candidate, the identifying comprising directly examining contents of the active memory to identify one or more data structures that are increasing in size over time;
- generating information about an identified leaking object, the generating comprising extracting the plurality of objects from the allocation trace as extracted candidate objects, determining for each candidate extracted object of the plurality of candidate objects whether the extracted candidate object is one of the at least one memory leak candidate, and identifying the extracted candidate object as the identified leaking object;
- and
- promoting the information about the identified leaking object.
Dependencies are inferred from the claim text.