Method for detecting memory leak based on linux kernel
AssigneeAmlogic (Shanghai) Co., Ltd.
InventorTao ZENG
Life of this patent
Estimating the term…
Loading patent…
AssigneeAmlogic (Shanghai) Co., Ltd.
InventorTao ZENG
Estimating the term…
A method for detecting a memory leak based on Linux kernel, applied to an detection of the memory leak, comprises: reading a node, acquiring the return addresses of the allocation functions of each of the plurality of memory pages and the number of the memory pages thereof; releasing the return addresses of the allocation functions and the number of the memory pages counted by the node; reading the node again, acquiring the return address of each of the allocation functions and the number of the memory pages thereof; comparing the number in each case to calculate a difference value, if the difference value is a positive value and monotonically increases, it's determined that the memory leak occurs in the memory pages allocated correspondingly by the allocation functions. During the detection of the memory leak, the detection method consumes less memory without affecting the efficiency in allocating and releasing the memory.
A method for detecting a memory leak based on Linux kernel, applied to an detection of the memory leak, wherein the memory comprises a plurality of memory pages, wherein a node is created through which return addresses of allocation functions to be called in each of the plurality of memory pages and the number of the memory pages allocated by each of the allocation functions are counted;
Dependencies are inferred from the claim text.