Memory leak positioning method and electronic equipment

A technology for memory leaks and electronic equipment, applied in the field of memory management, can solve problems such as the inability to locate page memory, the difficulty and complexity of system kernel and integrated components, etc.

Active Publication Date: 2017-02-15
CHENGDU HUAWEI TECH
View PDF5 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] This positioning method in the prior art can only locate block memory with memory leaks, but cannot locate page memory with memory leaks, and it is necessary to modify the memory management module by modifying the system kernel and integrated components, while modifying the system kernel and Integration components are extremely difficult and complex to implement

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
  • Memory leak positioning method and electronic equipment
  • Memory leak positioning method and electronic equipment
  • Memory leak positioning method and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0037] The electronic device involved in the embodiment of the present invention is a device with a unified block memory application and release interface, and a unified page memory application and release interface, for example, it may be an electronic device with an operating system such as Linux and Unix. Exemplarily, the electronic device may specifically be a notebook computer, a desktop computer, a tablet computer, a smart phone, and the like.

[...

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 embodiments of the invention provide a memory leak positioning method and electronic equipment, and relate to the technical field of memory management. Unified application and release interface functions of a memory unit are monitored by using a Hook technology without modifying a system memory management module, so that a block memory and a page memory with memory leak are accurately positioned. The method comprises the steps of: when the memory unit is applied via an application interface function, saving a mapping relation between the memory unit and an identifier of a function call stack, wherein the function call stack saves a function call relation of the memory unit applied via the application interface function, and the memory unit comprises block memories or page memories; when the memory unit is released via a release interface function, clearing the mapping relation between the memory unit and the identifier of the function call stack corresponding to the memory unit; and according to the multiple statistical memory sizes of the memory unit having the mapping relation with the identifier of each function call stack, determining the function call stack and the function with memory leak. The method is used for positioning memory leak.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of memory management, and in particular to a method for locating a memory leak and an electronic device. Background technique [0002] In electronic devices with operating systems such as Linux and Unix, the management of memory by the kernel is divided into page memory management and block memory management. Kernel-mode programs can apply for page memory usage or block memory usage. If there is a memory leak when the kernel mode program is running, it will cause insufficient system memory, and in severe cases, the system will crash. [0003] In the prior art, by modifying the memory management module in the operating system, a small memory diagnosis area is added after each piece of memory, which is used to save the usage status of the memory (for example, the application status or idle status), and memory application and Released function information, so as to locate the block m...

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/07G06F11/30
CPCG06F11/073G06F11/0751G06F11/079G06F11/3037G06F11/3055
Inventor 严小林
Owner CHENGDU HUAWEI TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products