Inventor(s)

Ben Cheng
Simon Que

Abstract

A memory leak detector system can be used to detect memory leaks, which is when a computer program fails to release unneeded memory allocations, in a computer that executes multiple programs. The system utilizes a multi tier methodology to detect memory leaks. In a first tier, the system collects a histogram representing allocation counts for different allocation sizes of memory at the computer. If the system detects an above-a-threshold increase in the number of allocations for one or more of the allocation sizes, the system marks the one or more allocation sizes as suspected leaks and proceeds to a second tier of the multiple tier method. In the second tier, the system collects a histogram based on call stacks that led to each above-a-threshold increase in allocation sizes detected in the first tier. The system marks the call stacks with an above-a-threshold increase in call stack traces as prospective leaks and proceeds to a third tier of the multiple tier leak detection method. In the third tier, the system records the allocation times of each memory allocation that fits the suspected leak profile, including leak sizes found in the first tier and call stacks found in the second tier. If the oldest allocations are not being freed and persist over a period of time, then the system marks the allocation(s), the allocation size(s), and the originating call stack(s) as a probable memory leak.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.

Share

COinS