Heap data processing method and device
A data processing and metadata technology, applied in the computer field, which can solve problems such as program or operating system damage
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Publication Date
- 2015-04-15
Smart Images
Figure 1 Figure 2 Figure 3
Abstract
Description
technical field
[0001] The present invention relates to the field of computer technology, in particular to a heap data processing method and device. Background technique
[0002] The heap is a computer memory area with continuous addresses. The heap area includes multiple continuous heaps. Heap overflow refers to the data length exceeding the heap that occurs when the amount of data filled by a computer program into a heap exceeds the capacity of the heap itself. storage boundary phenomenon. When a very long data is input into a certain heap, the excess part will be written into other adjacent heaps in the heap area, and other heaps may have stored data, such as storing the pointer of the next instruction executed by the program, or It is the output content of other programs, so all or part of these contents may be overwritten or destroyed. If the overwritten or destroyed content is more important, it will affect the subsequent normal operation. It can be seen that the over...
Examples
Embodiment Construction
[0022] The specific implementation manners of the heap data processing method and device of the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0023] The present invention provides a heap data processing method, such as figure 1 shown, including:
[0024] When it is determined that the user needs to allocate memory to write data, select a free heap from the heap area for allocation, and dynamically update the heap metadata corresponding to the allocated heap in the set area; or,
[0025] When it is determined that the user requests to release the allocated heap, release the allocated heap requested by the user, and dynamically update the heap metadata corresponding to the released heap in the set area;
[0026] The heap metadata of all the heaps is stored centrally in a set area in the memory outside the area occupied by all the heaps.
[0027] The heap is the memory area used by the user ...