Method for managing chained memory based on state machine
A state machine and memory technology, which is applied in the field of computer software programming, can solve problems such as disordered security and reduced memory space usage efficiency, and achieve the effect of solving disordered and security problems, improving usage efficiency, and a good security mechanism
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2021-04-02
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The present application relates to the technical field of computer software programming, in particular to a method for managing chained memory based on a state machine. Background technique
[0002] With the expansion of the capacity of memory devices in computer operating systems, the improvement of operating efficiency, and the expansion of the range of addressing space for system memory by 64-bit software programs, program developers have more loosely planned memory during the design process, and the frequency of use doubled compared to the past. Complicated planning and operations bring more risks and workload, such as memory access out of bounds, access overlap, synchronization deadlock, etc., which have gradually become the main problems that plague developers. Therefore, in terms of memory operation and management, more attention and creative development points began to gather, and more and more related strategies emerged.
[0003] A linked li...
Examples
Embodiment approach
[0051] As an implementation, the method also includes:
[0052] In the operation of calling the memory space or resetting the length of the linked list or the size of the memory block, all memory objects in the original memory space are deleted and released.
[0053] In this embodiment, the method also includes:
[0054] When the applicant applies for memory space in different states, set the corresponding state queue mutex object to no signal, and reset it to signal after the operation is completed.
specific Embodiment approach
[0055] On the other hand, the embodiment of the present application also provides specific implementation methods about the method, as follows:
[0056] (1) Interface encapsulation, with block number and block size as input parameters and management objects, pointer as return value or reference parameter encapsulation management object initialization interface function, for each state chain, use memory information structure object pointer as return value or The reference parameter encapsulates the acquisition and return interface functions, and encapsulates the management object release process as a release interface function.
[0057] (2) Initialize, call the initialization function to initialize the management object;
[0058] (3) Obtain free memory, call the free queue interface function to apply for the free memory information structure object pointer, and perform operations such as division and assignment of the memory blocks it contains, and set identification informatio...