Memory management method and device

A memory management and memory technology, applied in the computer field, can solve problems such as frequent process restarts, and achieve the effect of avoiding misjudgment and reducing frequency

Pending Publication Date: 2019-04-16
HUAWEI TECH CO LTD
View PDF3 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the traditional solution, as long as a process in the memory control group fails to apply for memory, the process in the memory control group is restarted, which may cause frequent restarts of the process

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 management method and device
  • Memory management method and device
  • Memory management method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] The technical solution in this application will be described below with reference to the accompanying drawings.

[0052] During the running of a process, if some processes of the process have memory leaks, these processes will occupy more and more memory, making it less and less easy for other processes in the process to apply for memory, thus making The number of memory application failures of the current process is increasing. That is to say, if the current process has a memory leak, it is likely to cause an increase in the number of memory application failures of the current process. Therefore, this application proposes a method for managing memory. In this method, it is possible to judge whether the current process has a memory leak according to the number of memory application failures of the current process, and then decide whether to restart the current process. Exclude other factors (for example, a program execution error causes the current process to fail to ap...

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 memory management method and device. The method comprises: according to a memory application result of a current process, a memory application failure frequency statistical value Z of the current process is adjusted; and when Z exceeds a preset failure frequency threshold value, restarting the current process. According to the method, frequent restarting of the process canbe avoided as much as possible.

Description

technical field [0001] The present application relates to the field of computer technology, and more specifically, to a memory management method and device. Background technique [0002] For programs written in C / C++, due to the lack of a garbage collection (garbage collection, GC) mechanism, the memory occupied by the process will not be recovered. When a memory leak occurs in the process executing the program written in C / C++, the process More and more memory will be occupied, causing the system to run slower and slower, and even cause the system to run out of memory (OOM) in severe cases. [0003] In order to solve the above problems, the traditional solution adopts the cgroup mechanism in the linux system (the mechanism manages and controls the behavior of the system resources used by the process in the form of grouping) to group all processes, create multiple memory management and control groups, and create multiple memory control groups for each The memory control gro...

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): G06F9/50
CPCG06F9/5016
Inventor 刘志光
Owner HUAWEI TECH CO LTD
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