Unlock instant, AI-driven research and patent intelligence for your innovation.

Linux-kernel-based detection method for memory leakage

一种检测方法、内存泄露的技术,应用在通信领域,能够解决延长内存分配释放的时间、增加CPU消耗负担、降低系统效率等问题

Active Publication Date: 2018-03-09
AMOLOGIC (SHANGHAI) CO LTD
View PDF8 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The above-mentioned memleak technology has the following defects. During the detection process, periodic scanning is required, which will increase the CPU consumption burden; when the memory is allocated and released, the slab allocation is performed again to record the information of the memory object, which will prolong the memory allocation and release. time, reducing system efficiency

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Linux-kernel-based detection method for memory leakage
  • Linux-kernel-based detection method for memory leakage
  • Linux-kernel-based detection method for memory leakage

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0039] It should be noted that, in the case of no conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.

[0040] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but not as a limitation of the present invention.

[0041] The technical scheme of the present invention includes a detection method based on Linux kernel memory le...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a Linux-kernel-based detection method for memory leakage, and is applied to detection on memory leakage. The Linux-kernel-based detection method for memory leakage comprises thefollowing steps: reading nodes, and acquiring a return address of every memory page distribution function and the number of memory pages which are distributed correspondingly by the distribution functions; after reading is finished, releasing the return addresses of the distribution functions counted by the nodes and the number of the memory pages which are distributed correspondingly by the distribution functions; reading the nodes again, and acquiring the return address of every distribution function and the number of the memory pages which are distributed correspondingly by the distribution functions; and comparing the numbers of the memory ages which are correspondingly distributed by the same distribution functions to obtain difference, and if the difference is a positive value and is increased continuously, determining that the memory pages which are distributed correspondingly by the distribution functions leak. By the technical scheme, the Linux-kernel-based detection method for memory leakage has the beneficial effects that in a process of detecting whether the memory leaks or not, consumption of the memory is small, and distribution and releasing efficiency of the memoryare not affected.

Description

technical field [0001] The invention relates to the field of communication technology, in particular to a detection method based on Linux kernel memory leaks. Background technique [0002] Memory leak (Memory Leak) refers to the heap memory that has been dynamically allocated in the program is not released or cannot be released for some reason, resulting in a waste of system memory, resulting in serious consequences such as slowing down the running speed of the program and even system crashes. In the existing Linux system, memory leak detection is specifically through Kernel's default memleak detection technology. After the memleak detection method is executed, the Kernel (kernel) will track its pointer at the return point of calling kmalloc, vmalloc, kmem_cache_alloc and other functions , together with its size and stack trace information, are stored in the PRIO search tree. When the kernel releases the memory, it will delete the stored trace information through kmemleak_fr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36G06F9/50
CPCG06F9/5016G06F9/5022G06F11/366G06F11/3636G06F2201/865G06F2201/88G06F11/302
Inventor 曾涛
Owner AMOLOGIC (SHANGHAI) CO LTD