Sharing internal memory management method and apparatus

A shared memory and management method technology, applied in the field of shared memory management methods and devices, can solve problems such as memory leaks, troubleshooting difficulties, over-deletion or over-writing, and achieve the effect of eliminating residual memory blocks

Inactive Publication Date: 2009-07-01
HUAWEI SOFTWARE TECH
View PDF3 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

While pointers and dynamic memory bring the benefits of flexibility, they also bring some leaks and other problems caused by improper use, and such problems are sometimes hidden and very difficult to troubleshoot
[0003] Especially when creating memory space and deleting memory space, it lacks the necessary p

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
  • Sharing internal memory management method and apparatus
  • Sharing internal memory management method and apparatus
  • Sharing internal memory management method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0037] Such as figure 1 As shown, it is a flow chart of the first embodiment of the shared memory management method of the present invention, and the shared memory management method is specifically as follows:

[0038] Step 101, create a linked list, the linked list contains node information, data information and edge boundary marker information corresponding to each memory block, the node information is located in the node area, the data information is located in the data area, the edge boundary The tag information is located in the tag area, and the node information includes at least the size of the data area, a status tag for indicating whether there is data information in the data area, an address of a forward memory block, and an address of a backward memory block;

[0039] Step 102, reading corresponding node information;

[0040] Step 103, delete the corresponding memory block according to the node information.

[0041] In the first embodiment of the shared memory man...

no. 4 example

[0089] Such as Figure 8 As shown, it is a flow chart of the fourth embodiment of the shared memory management method of the present invention, and the shared memory management method is specifically as follows:

[0090] Step 801, start the main process.

[0091] Step 802 , judging whether the instruction value of creating a sub-process corresponding to the main process is to generate a sub-process; if it is necessary to generate a sub-process, perform step 803 . In the implementation process, if the value of the create child process command is set to "0", it is necessary to generate a child process, and when the value of the create child process command is set to "1", it is set to not need to generate a child process, that is, to create a child process command When the value is "0", step 803 is executed.

[0092] Step 803, generate an empty stack, the sub-process corresponds to a memory doubly linked list, the memory doubly linked list contains node information, data inform...

no. 6 example

[0105] Such as Figure 10 As shown, it is a flowchart of the sixth embodiment of the shared memory management method of the present invention, and the shared memory management method specifically includes the following:

[0106] Step 1001, the execution of the main process is completed, and step 1002 is executed; the main process corresponds to at least one sub-process, and the memory doubly-linked list corresponding to the sub-process is located in a stack, and the memory doubly-linked list contains information related to each memory block Corresponding node information, data information and edge boundary label information, the node information is located in the node area, the data information is located in the data area, the edge boundary label information is located in the label area, and the node information includes at least the data area The size of the data area, the status flag used to indicate whether there is data information in the data area, the address of the forw...

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 management method of shared memory and a device, wherein the method comprises a memory double linked list is built, the memory double linked list comprises node information, data information and edge boundary marker information which correspond to each memory block, the node information is located in a node area, the data information is located in a data area, and the edge boundary marker information is located in a marker area. The node information at least comprises the size of the data area, a state marker, an address of a forward memory clock and an address of a backward memory block, wherein the state marker is used to express whether the data area has the data information, corresponding node information is read, and corresponding memory blocks are deleted according to the node information. The invention overcomes the management defect in the prior art that the shared memory can not be effectively managed after building a memory linked list, provides an effective protection mechanism of the shared memory, which leads an application program to effectively manage the space of the shared memory.

Description

technical field [0001] The invention belongs to the field of computers, in particular to a shared memory management method and device. Background technique [0002] In the field of software programming, pointers and dynamic memory are very important concepts. Using the characteristics of pointers and dynamic memory to carry out related software programming provides features and high efficiency that are difficult to achieve in other software programming methods, and provides great benefits for developers. programming flexibility. While pointers and dynamic memory bring the benefits of flexibility, they also bring some leaks and other problems caused by improper use, and such problems are sometimes hidden and very difficult to troubleshoot. [0003] Especially when creating and deleting memory space, it lacks the necessary protection mechanism to create directly through the create command (new) or directly delete through the delete command (delete), so that the application ca...

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
IPC IPC(8): G06F9/50
Inventor 姜琰祥房厚波
Owner HUAWEI SOFTWARE 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