| Methods, systems and computer program products for detecting memory leaks -> Monitor Keywords |
|
Methods, systems and computer program products for detecting memory leaksRelated Patent Categories: Data Processing: Software Development, Installation, And Management, Software Program Development Tool (e.g., Integrated Case Tool Or Stand-alone Development Tool), Testing Or Debugging, Monitoring Program ExecutionMethods, systems and computer program products for detecting memory leaks description/claimsThe Patent Description & Claims data below is from USPTO Patent Application 20060212852, Methods, systems and computer program products for detecting memory leaks. Brief Patent Description - Full Patent Description - Patent Application Claims BACKGROUND OF THE INVENTION [0001] The present invention relates to data processing in general and, more particularly, to methods, systems, and computer program products for monitoring program code memory usage. [0002] Object oriented programming is a well-known software application development technique that employs collections of objects or discrete modular data structures that are identified by so called references. More than one reference can identify the same object. The references can be stored in the application variables and within the objects, forming a network of objects and references, known as the reference graph. The objects are created dynamically during the application execution, and are contained in a memory structure referred to as a heap. [0003] Many object oriented programming languages, such as JAVA.RTM., Eiffel, and C sharp C#), employ automatic memory management, popularly known as garbage collection. Automatic memory management is an active component of the runtime system associated with the implementation of the object oriented language, which removes unneeded objects from the heap during the application execution. An object is unneeded if the application will no longer use it during its execution. A common way of determining at least substantial subset of the unneeded objects is to determine so called "liveness" of all objects in the heap. An object is defined as "live" if there exists a path of references starting from one of the application variables, and ending at the reference to the given object. A path of references is defined as a sequence of references in which each reference with the exception of the first reference in the sequence is contained within the object identified by the previous reference in the sequence. [0004] A frequent problem appearing in object oriented applications written in languages with automatic memory management is that some objects due to the design or coding errors remain live, contrary to the programmer's intentions. Such objects are called lingering objects. Lingering objects tend to accumulate over time, clogging the heap and causing multiple performance problems, eventually leading to the application crash. [0005] To detect the lingering objects, programmers in the development phase of the application life-cycle employ memory debugging or memory profiling tools. In one widely practiced debugging methodology, the tool produces a heap dump which serves as a baseline snapshot that illustrates the objects residing in the heap at the given time. A set of test inputs is then run through the program and the tool produces a second snapshot of the heap which illustrates the objects residing in the heap at the second time. The programmer then compares the two snapshots to determine which objects are accumulating over time. By analyzing the reference graphs contained in the heap dumps, and using his/her skills and the knowledge of the program logic, the programmer can determine which objects are lingering, and, what is even more important, why they stay alive. Then the programmer can proceed with fixing the application program in such a way that no more reference paths to the lingering objects can be found by the garbage collector. Despite the acceptance of existing approaches to finding lingering objects, they may be tedious to use, and may not easily scale in a production environment, where heap sizes can be of order of gigabytes. [0006] U.S. Patent Publication No. 2004/0181782 discusses a system and method for optimizing memory usage by locating lingering objects. U.S. Pat. No. 6,167,535 discusses object heap analysis techniques for discovering memory leaks and other run time information. U.S. Pat. No. 6,694,507 discusses a method and apparatus for analyzing performance of object oriented programming code. U.S. Pat. No. 6,434,575 discusses a method of instrumenting garbage collection generating a trace file making a single pass analysis of object heap. The disclosures of U.S. Patent Publication No. 2004/0181782, U.S. Pat. No. 6,176,535, U.S. Pat. No. 6,694,507, and U.S. Pat. No. 6,434,575 are hereby incorporated herein in their entirety by reference. [0007] Notwithstanding the systems and methods discussed above, there continues to exist a need for methods, systems, and computer program products providing monitoring of object oriented program code memory usage. SUMMARY OF THE INVENTION [0008] According to embodiments of the present invention, methods detecting a memory leak may include identifying a largest ChildNode of a ParentNode, and comparing a total size of the ParentNode to a total size of the largest ChildNode of the ParentNode. If the total size of the ParentNode is significantly larger than the total size of the largest ChildNode of the ParentNode, a possible memory leak area may be identified. [0009] For example, comparing a total size of the ParentNode to a total size of the largest ChildNode may include calculating a difference between the total size of the ParentNode and the total size of the largest ChildNode. Accordingly, identifying a possible memory leak area may include identifying a possible memory leak area if the difference between the total size of the Parent Node and the total size of the largest ChildNode exceeds a difference threshold. [0010] In an alternative, comparing a total size of the ParentNode to a total size of the largest ChildNode may include calculating a ratio of the total size of the largest ChildNode with respect to the total size of the ParentNode. Accordingly, identifying a possible memory leak area may include identifying a possible memory leak area if the ratio of the total size of the largest ChildNode with respect to the total size of the ParentNode is less than a ratio threshold. [0011] In addition, if the total size of the ParentNode is not significantly larger than the total size of the largest ChildNode, a largest GrandChildNode may be identified. After identifying the largest GrandChildNode, a total size of the ChildNode may be compared to a total size of the largest GrandChildNode. If the total size of the ChildNode is significantly larger than the total size of the largest GrandChildNode, a possible memory leak area may be identified. [0012] Moreover, if the total size of the ParentNode is not significantly larger than the total size of the largest ChildNode of the ParentNode, the total size of the ChildNode may be compared to a size threshold. If the total size of the ChildNode is less than the size threshold, a no memory leak detected result may be returned. If the total size of the ChildNode is greater than the size threshold, a largest GrandChildNode may be identified. After identifying the largest GrandChildNode, a total size of the ChildNode may be compared to a total size of the largest GrandChildNode, and if the total size of the ChildNode is significantly larger than the total size of the largest GrandChildNode, a possible memory leak area may be identified. [0013] If the total size of the ParentNode is not significantly larger than the total size of the largest ChildNode, a determination may be made if the largest ChildNode is a terminal node. If the largest ChildNode is a terminal node, a no memory leak detected result may be returned. If the largest ChildNode is not a terminal node, a largest GrandChildNode may be identified. After identifying the largest GrandChildNode, a total size of the ChildNode may be compared to a total size of the largest GrandChildNode. If the total size of the ChildNode is significantly larger than the total size of the largest GrandChildNode, a possible memory leak area may be identified. [0014] If the total size of the ParentNode is not significantly larger than the total size of the largest ChildNode, a determination may be made if the largest ChildNode is a terminal node. If the largest ChildNode is a terminal node, a no memory leak detected result may be returned. If the total size of the ParentNode is not significantly larger than the total size of the largest ChildNode, the total size of the ChildNode may be compared to a size threshold. If the total size of the ChildNode is less than the size threshold, a no memory leak detected result may be returned. If the ChildNode is not a terminal node and if the total size of the ChildNode is greater than the size threshold, a largest GrandChildNode may be identified. After identifying the largest GrandChildNode, a total size of the ChildNode may be compared to a total size of the largest GrandChildNode. If the total size of the ChildNode is significantly larger than the total size of the largest GrandChildNode, a possible memory leak area may be identified. [0015] According to other embodiments of the present invention, a computer program product may be provided for detecting a memory leak. The computer program product may include a computer readable medium having computer readable program code embodied therein. More particularly, the computer readable program code may include computer readable program code configured to identify a largest ChildNode of a ParentNode, and computer readable program code configured to compare a total size of the ParentNode to a total size of the largest ChildNode of the ParentNode. Additional computer readable program code may be configured to identify a possible memory leak area if the total size of the ParentNode is significantly larger than the total size of the largest ChildNode of the ParentNode. [0016] According to still other embodiments of the present invention, a system may be provided for detecting a memory leak. The system may include a processor configured to identify a largest ChildNode of a ParentNode, and to compare a total size of the ParentNode to a total size of the largest ChildNode of the ParentNode. The processor may be further configured to identify a possible memory leak area if the total size of the ParentNode is significantly larger than the total size of the largest ChildNode of the ParentNode. BRIEF DESCRIPTION OF THE DRAWINGS [0017] FIG. 1 is a block diagram of data processing systems according to some embodiments of the present invention. [0018] FIG. 2 is a more detailed block diagram of systems providing memory leak detection according to some embodiments of the present invention. [0019] FIG. 3 is a is a flowchart illustrating operations for detecting memory leaks according to some embodiments of the present invention. [0020] FIG. 4 is a is a flowchart illustrating operations for detecting memory leaks according to further embodiments of the present invention. [0021] FIG. 5 is a memory tree according to some embodiments of the present invention. Continue reading about Methods, systems and computer program products for detecting memory leaks... Full patent description for Methods, systems and computer program products for detecting memory leaks Brief Patent Description - Full Patent Description - Patent Application Claims Click on the above for other options relating to this Methods, systems and computer program products for detecting memory leaks patent application. ### 1. Sign up (takes 30 seconds). 2. Fill in the keywords to be monitored. 3. Each week you receive an email with patent applications related to your keywords. Start now! - Receive info on patent apps like Methods, systems and computer program products for detecting memory leaks or other areas of interest. ### Previous Patent Application: Overriding constructors to provide notification in order to detect foreign code Next Patent Application: Real-time control apparatus having a multi-thread processor Industry Class: Data processing: software development, installation, and management ### FreshPatents.com Support Thank you for viewing the Methods, systems and computer program products for detecting memory leaks patent info. IP-related news and info Results in 0.16791 seconds Other interesting Feshpatents.com categories: Daimler Chrysler , DirecTV , Exxonmobil Chemical Company , Goodyear , Intel , Kyocera Wireless , 174 |
* Protect your Inventions * US Patent Office filing
PATENT INFO |
|