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

A memory management method and system adopting analysis-feedback-tuning mode

A memory management and memory allocation technology, applied in resource allocation, multi-programming devices, etc., can solve problems such as inability to continue allocating memory, non-continuous memory fragmentation, and memory leaks, so as to improve development and testing efficiency and solve memory fragmentation problems , the effect of improving operating efficiency

Active Publication Date: 2019-10-01
李鹤
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Running such software for a long time will cause a lot of memory fragmentation
Since such memory fragments in the memory management algorithm of the C++ / C standard library are also organized together in chains, it will greatly increase the time for subsequent memory allocation
Moreover, these memory fragments are not continuous, which makes it impossible to continue to allocate larger-sized memory, but in fact, the system still has enough free memory at this time
[0006] 2. There is no protection mechanism for the use of allocated memory, and there are no protection measures for common problems such as memory write out of bounds, illegal access, and memory leaks
Any allocation / freeing inconsistencies can lead to memory leaks or system crashes
Moreover, the problems caused by memory writing out of bounds and illegal access are very difficult to locate and solve, so it will increase the burden on programmers and require programmers to have a high level of system knowledge
Usually memory corruption is caused by out-of-bounds writes to arrays or pointers
For example, the array writes out of bounds, and 110 bytes are continuously written to a temporarily allocated 100-byte array. At this time, the last 10 bytes are destroyed, and these 10 bytes are the header structure of another data block. , causing the system to crash when another data block is freed
Writing out of bounds for pointers can cause more serious problems, sometimes out of bounds writing to pointers can randomly destroy some data structures without causing the system to crash immediately
But as the software continues to run, it will cause a series of subsequent memory corruptions, eventually leading to software data errors or system crashes
By this time, it is impossible to track down the most original damage point, and it is impossible to find the problem. This is an extremely difficult problem in C / C++ development, and it usually takes programmers a lot of time to try to solve it, resulting in the entire Project development delays
If such problems occur in the secondary development and maintenance process in the later stage, it is very likely that the problem cannot be found and solved, and eventually the entire software life cycle will be shortened.
[0008] In short, in the memory management algorithm of the C++ / C standard library, the efficiency of a large amount of memory allocation and recovery is not high, and the performance is very unstable.
There is no protection mechanism for allocated memory, and there is no protection for common problems such as memory corruption and memory leaks

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
  • A memory management method and system adopting analysis-feedback-tuning mode
  • A memory management method and system adopting analysis-feedback-tuning mode
  • A memory management method and system adopting analysis-feedback-tuning mode

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be described in further detail below in conjunction with specific embodiments and with reference to the accompanying drawings. However, those skilled in the art know that the present invention is not limited to the drawings and the following embodiments.

[0049] A kind of memory management method that adopts analysis-feedback-tuning mode proposed by the present invention, the analysis-feedback-tuning mode memory management algorithm used in the method is provided in the mode of independent module (dynamic library), and this dynamic library and The third-party tested or optimized software is linked together, that is, the analysis-feedback-tuning mode memory management algorithm can be used.

[0050] as attached figure 1 Shown, memory management method of the present invention comprises the following steps:

[0051] Step 1. Set the core parameters...

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 relates to a memory management method adopting an analysis-feedback-tuning mode. The method comprises the following steps: step one: setting a kernel parameter of a configurable efficient memory pool in a configuration file, linking the configuration file to third-party application software; step two: running the third-party application software; step three: obtaining a memory usage analysis result in the running period after the running is finished; step four: judging whether a memory usage rate is an optimal value;; if the memory usage rate is not the optimal value, adjusting the kernel parameter according to the feedback of the analysis result, and repeating the step two to four; if the memory usage rate is the optimal value, regarding the kernel parameter as the optimal kernel parameter, and finishing the procedure. The invention further provides a memory management system for realizing the method. By use of the method disclosed by the invention, the problems of memory fragmentation, seriously reduced performance, and absent protection mechanism in the distributed memory are solved.

Description

technical field [0001] The invention belongs to the field of computer memory management, and specifically relates to a memory management method and system adopting an analysis-feedback-tuning mode, and is mainly used for optimizing, troubleshooting and testing memory usage. Background technique [0002] In computer memory management, the C / C++ standard heap management algorithm is mainly used, but this algorithm has two main defects: [0003] 1. For a large amount of memory allocation and recovery efficiency is not high, resulting in memory fragmentation, performance degradation. [0004] The basic principle of the general memory management algorithm provided by the operating system is to divide the complete heap memory into memory blocks of different sizes, and use a linked list structure to link these memory blocks of different sizes together. When allocating memory, you first need to search for a memory block of a suitable size. If there is no memory block of a suitable ...

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 Patents(China)
IPC IPC(8): G06F9/50
Inventor 李鹤
Owner 李鹤