Memory pool management method, device, and computer-readable storage medium
A management method and memory pool technology are applied in the field of computer-readable storage media and memory pool management, and can solve the problems of slow search speed and low efficiency.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0042] In order to solve the existing problem that when searching for the memory block to which the memory unit to be released belongs, it is usually sequentially judged whether the memory unit to be released belongs to the memory block in the memory pool, resulting in too slow search speed and low efficiency. A memory pool management method is provided. The size of the memory block that the memory pool applies to the operating system each time is N1, where N1 is an integer greater than or equal to 1, that is, the memory pool is a fixed memory pool. Wherein, N1 may be 2Kbit, 3Kbit, 4Kbit, etc. The details can be flexibly set according to actual needs. See figure 1 as shown, figure 1 The basic flowchart of the memory pool management method provided in this embodiment, the memory pool management method includes:
[0043] S101. Determine target subscripts in the management array corresponding to each memory block in the memory pool according to a preset rule.
[0044] It shou...
no. 2 example
[0077] In order to better understand the present invention, this embodiment will be described in conjunction with a more specific example, assuming that the application program to which the memory pool belongs is a 32-bit application program, the operating system is a 32-bit operating system, and the memory pool applied to the operating system each time The size of the block is N1, please refer to the figure, Figure 8 It is a detailed flow chart of the memory pool management method provided in the second embodiment of the present invention. The memory pool management method includes:
[0078] S801. Create a new management array.
[0079] Among them, the management array is a one-dimensional array, the initial value of each element in the management array is 0, and the number of elements in the management array is N2, where N2 is equal to the maximum virtual memory of the application program to which the memory pool belongs divided by the memory in the memory pool The resulti...
no. 3 example
[0119] This embodiment provides a device, as shown in the figure, the device includes a processor 901, a memory 902, and a communication bus 903, wherein:
[0120] The communication bus 903 is used to realize connection and communication between the processor 901 and the memory 902;
[0121] The processor 901 is configured to execute one or more programs stored in the memory 902, so as to implement the steps of the memory pool management method in the first embodiment and / or the second embodiment above.
[0122] It should be noted that the device in this embodiment may be implemented in various forms. For example, the devices described in this embodiment may include mobile phones, tablet computers, notebook computers, palmtop computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, portable Mobile devices such as wearable devices, smart bracelets, and pedometers, and stationary devices s...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


