Memory resource calling optimization method and system

Through comprehensive monitoring and scheduling analysis of memory resources, generating allocation and recycling notifications, the flexible allocation and fragments of memory blocks are realized, and the problems of large memory fragments, low utilization and flexibility in existing technologies have improved the memory of memory, which improves the memory of memory. Utility and system adaptability.

CN119356850APending Publication Date: 2025-01-24BEIJING RONGXUN OPTICAL TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411339198.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In the prior art, there are many memory fragments, low utilization rate and poor flexibility, which cannot effectively meet the non-standard memory size requirements of different applications.

Method used

Through comprehensive monitoring of memory resources, obtain internal memory monitoring data, scheduling and analysis of data, generate distribution call notification or recycling call notification; according to the distribution call notification, obtain program request information and memory status information, allocate the target memory block for memory resource allocation of memory resource allocation ; According to the recycling call notification, determine multiple adjacent free memory to compress and recycle it; when the preset fragments are compiled, the integrated decentralized memory fragments are available memory blocks.

Benefits of technology

The problem of large memory fragments, low utilization rate and poor flexibility, realized more efficient memory allocation and recycling, reducing memory fragments, improving the use of memory, and enhancing the system's adaptation to different memory demand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356850A_ABST
    Figure CN119356850A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of memory resource calling, and provides a memory resource calling optimization method and system. The method comprises the following steps: comprehensively monitoring memory resources to obtain memory monitoring data, scheduling and analyzing the memory monitoring data, and generating a distribution call notification or a recovery call notification; obtaining program request information and memory state information according to the allocation call notification, and allocating the target memory block to perform memory resource configuration; determining a plurality of adjacent idle memories according to the recovery calling notification, and compressing and recovering the plurality of adjacent idle memories; and when a preset fragment arrangement condition is met, identifying a plurality of dispersed memory fragments, and integrating the plurality of memory fragments into an available memory block. According to the method, the problems of more memory fragments, low utilization rate and poor flexibility in the prior art can be solved, more efficient memory allocation and recovery can be realized, the memory fragments are reduced, the utilization rate of the memory is improved, and meanwhile, the adaptability of a system to different memory requirements is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of memory resource calling, and in particular relates to a memory resource calling optimization method and system. Background Art

[0002] In today's highly developed information technology field, the complexity of computer systems and applications is increasing day by day, which makes the efficient management and call of memory resources a crucial link. As one of the core components in a computer system, the performance of memory directly determines the operating efficiency and stability of the entire system. In this field, a series of key technologies continue to emerge and evolve. Memory allocation algorithms, such as the first fit algorithm and the best fit algorithm, aim to reasonably allocate memory space to different applications and tasks to meet their memory needs. Memory recycling mechanisms, such as mark-sweep and copy algorithms, are responsible for timely and effective recycling of these resources for reallocation and utilization when applications release memory. Caching technology reduces the number of accesses to the main memory by storing frequently accessed data in a faster cache, thereby improving system performance.

[0003] Existing memory resource calling technologies usually adopt an allocation strategy based on fixed-size blocks, that is, the memory is divided into fixed-size blocks in advance. When memory allocation is required, a suitable block is selected from these fixed-size blocks for allocation. This has the following technical defects: (1) The fixed-size block allocation strategy is prone to cause memory fragmentation. Since the memory requirements of applications vary, a large number of small blocks of memory may not be fully utilized, thereby reducing memory utilization; (2) The fixed-size allocation method may not meet the requirements of some special applications for non-standard memory sizes, limiting the flexibility of the system. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method and system for optimizing memory resource calling, aiming to solve the technical problems existing in the prior art mentioned in the background technology.

[0005] The embodiment of the present invention is implemented as follows:

[0006] A method for optimizing memory resource calls, the method comprising the following steps:

[0007] Perform comprehensive monitoring of memory resources, obtain memory monitoring data, perform scheduling analysis on the memory monitoring data, and generate allocation call notifications or recycling call notifications;

[0008] According to the allocation call notification, program request information and memory status information are obtained, and a target memory block is allocated to perform memory resource configuration;

[0009] According to the recycling call notification, multiple adjacent free memories are determined, and the multiple adjacent free memories are compressed and recycled;

[0010] When a preset defragmentation condition is reached, a plurality of scattered memory fragments are identified, and the plurality of memory fragments are integrated into an available memory block.

[0011] As a further limitation of the technical solution of the embodiment of the present invention, the comprehensive monitoring of memory resources, obtaining memory monitoring data, performing scheduling analysis on the memory monitoring data, and generating an allocation call notification or a recycling call notification specifically include the following steps:

[0012] Monitor multiple local memories and obtain multiple local memory data;

[0013] A global collaborative decision analysis is performed on the plurality of local memory data to generate an allocation call notification or a recycling call notification.

[0014] As a further limitation of the technical solution of the embodiment of the present invention, the obtaining of program request information and memory status information according to the allocation call notification and the allocation of target memory blocks for memory resource configuration specifically include the following steps:

[0015] According to the allocation call notification, program request information and memory status information are obtained;

[0016] Based on a preset adaptive allocation algorithm, the program request information and the memory status information are analyzed to allocate a target memory block;

[0017] Memory resources are configured for the target memory block.

[0018] As a further limitation of the technical solution of the embodiment of the present invention, the obtaining of program request information and memory status information according to the allocation call notification and the allocation of target memory blocks for memory resource configuration specifically include the following steps:

[0019] According to the allocation call notification, program request information and memory status information are obtained;

[0020] Based on a preset buddy system algorithm, the program request information and the memory status information are analyzed, and a target memory block is allocated;

[0021] Memory resources are configured for the target memory block.

[0022] As a further limitation of the technical solution of the embodiment of the present invention, the step of determining a plurality of adjacent free memories according to the recycling call notification and compressing and recycling the plurality of adjacent free memories specifically comprises the following steps:

[0023] According to the recycling call notification, determining a plurality of adjacent free memories;

[0024] Based on the preset mark compression algorithm, multiple adjacent free memories are compressed and recycled.

[0025] As a further limitation of the technical solution of the embodiment of the present invention, the step of determining a plurality of adjacent free memories according to the recycling call notification and compressing and recycling the plurality of adjacent free memories specifically comprises the following steps:

[0026] According to the recycling call notification, determining a plurality of adjacent free memories;

[0027] Based on the preset reference counting algorithm, multiple adjacent free memories are compressed and recycled.

[0028] As a further limitation of the technical solution of the embodiment of the present invention, when the preset defragmentation condition is met, identifying multiple scattered memory fragments and integrating the multiple memory fragments into an available memory block specifically includes the following steps:

[0029] When the preset memory usage threshold is reached, the memory space is fully traversed to identify multiple scattered memory fragments;

[0030] The plurality of memory fragments are integrated into an available memory block.

[0031] As a further limitation of the technical solution of the embodiment of the present invention, when the preset defragmentation condition is met, identifying multiple scattered memory fragments and integrating the multiple memory fragments into an available memory block specifically includes the following steps:

[0032] When the preset memory usage cycle is reached, the memory space is fully traversed to identify multiple scattered memory fragments;

[0033] The plurality of memory fragments are integrated into an available memory block.

[0034] A memory resource call optimization system, the system comprises a memory management module, a memory allocation module, a memory recovery module and a memory fragmentation module, wherein:

[0035] A memory management module is used to perform comprehensive monitoring of memory resources, obtain memory monitoring data, perform scheduling analysis on the memory monitoring data, and generate allocation call notifications or reclaim call notifications;

[0036] A memory allocation module, used to obtain program request information and memory status information according to the allocation call notification, and allocate a target memory block for memory resource configuration;

[0037] A memory recycling module, used to determine a plurality of adjacent free memories according to the recycling call notification, and to compress and recycle the plurality of adjacent free memories;

[0038] The memory defragmentation module is used to identify multiple scattered memory fragments and integrate the multiple memory fragments into available memory blocks when a preset defragmentation condition is reached.

[0039] As a further limitation of the technical solution of the embodiment of the present invention, the memory management module specifically includes:

[0040] Multiple auxiliary controllers, used for monitoring multiple local memories and obtaining multiple local memory data;

[0041] The main controller is used to perform global collaborative decision analysis on the multiple local memory data and generate an allocation call notification or a recycling call notification.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The embodiment of the present invention performs comprehensive monitoring of memory resources, obtains memory monitoring data, performs scheduling analysis on the memory monitoring data, generates allocation call notification or recovery call notification; obtains program request information and memory status information according to the allocation call notification, allocates target memory blocks for memory resource configuration; determines multiple adjacent free memories according to the recovery call notification, compresses and recovers multiple adjacent free memories; identifies multiple scattered memory fragments when the preset defragmentation conditions are met, and integrates multiple memory fragments into available memory blocks. The present invention can solve the problems of many memory fragments, low utilization and poor flexibility in the prior art, and can achieve more efficient memory allocation and recovery, reduce memory fragments, improve memory utilization, and enhance the system's adaptability to different memory requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flow chart of a memory resource call optimization method provided by an embodiment of the present invention is shown;

[0045] Figure 2 The application architecture diagram of the memory resource call optimization system provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0047] It is understandable that existing memory resource calling technologies usually adopt an allocation strategy based on fixed-size blocks, that is, the memory is divided into fixed-size blocks in advance. When memory allocation is required, a suitable block is selected from these fixed-size blocks for allocation. This has the following technical defects: (1) The fixed-size block allocation strategy is prone to cause memory fragmentation. Since the memory requirements of applications vary, a large number of small blocks of memory may not be fully utilized, thereby reducing memory utilization; (2) The fixed-size allocation method may not meet the requirements of some special applications for non-standard memory sizes, limiting the flexibility of the system.

[0048] To solve the above problems, the embodiment of the present invention discloses a memory resource call optimization method and system, which comprehensively monitors memory resources, obtains memory monitoring data, performs scheduling analysis on memory monitoring data, and generates allocation call notification or recovery call notification; according to the allocation call notification, obtains program request information and memory status information, allocates target memory blocks for memory resource configuration; according to the recovery call notification, determines multiple adjacent free memories, and compresses and recovers multiple adjacent free memories; when the preset defragmentation conditions are met, identifies multiple scattered memory fragments, and integrates multiple memory fragments into available memory blocks. It can solve the problems of many memory fragments, low utilization and poor flexibility in the prior art, and can achieve more efficient memory allocation and recovery, reduce memory fragments, improve memory utilization, and enhance the system's adaptability to different memory requirements.

[0049] Specifically, Figure 1 A flow chart of a memory resource calling optimization method provided by an embodiment of the present invention is shown.

[0050] In a preferred embodiment of the present invention, a method for optimizing memory resource calls includes the following steps:

[0051] Step S101: perform comprehensive monitoring of memory resources, obtain memory monitoring data, perform scheduling analysis on the memory monitoring data, and generate an allocation call notification or a reclaim call notification.

[0052] In an embodiment of the present invention, by monitoring multiple local memories in the memory space, obtaining multiple local memory data, and then performing global collaborative decision analysis on the multiple local memory data, memory allocation is performed flexibly and accurately based on the actual memory requirements of the application, and an allocation call notification or a recycling call notification is generated.

[0053] Step S102: According to the allocation call notification, program request information and memory status information are obtained, and a target memory block is allocated to perform memory resource configuration.

[0054] In an embodiment of the present invention, program request information and memory status information are obtained in accordance with an allocation call notification, and based on a preset adaptive allocation algorithm or a buddy system algorithm, the program request information and memory status information are analyzed, a target memory block is allocated, and then memory resources are configured for the target memory block to achieve optimal configuration of memory resources. In the buddy system algorithm, groups are performed according to sizes that are powers of 2, and operations are performed in groups during allocation and recovery, thereby improving memory allocation efficiency and reducing the generation of memory fragmentation.

[0055] Step S103: according to the recycling call notification, determine a plurality of adjacent free memories, and perform compression recycling on the plurality of adjacent free memories.

[0056] In an embodiment of the present invention, multiple adjacent free memories are determined according to the recycling call notification, and based on a preset mark compression algorithm or a reference counting algorithm, the multiple adjacent free memories are compressed and recycled, thereby effectively reducing the generation of memory fragmentation and ensuring the continuity and availability of the memory space. Among them, the reference counting algorithm decides whether to recycle the memory by recording the number of times the object is referenced in real time.

[0057] Step S104: when a preset defragmentation condition is met, a plurality of scattered memory fragments are identified, and the plurality of memory fragments are integrated into an available memory block.

[0058] In an embodiment of the present invention, when a preset memory usage threshold or memory usage cycle is reached, the memory space is fully traversed to identify multiple scattered memory fragments, and then the multiple memory fragments are integrated into available memory blocks, thereby further improving memory utilization.

[0059] Furthermore, Figure 2 The application architecture diagram of the memory resource call optimization system provided by an embodiment of the present invention is shown.

[0060] Among them, in another preferred embodiment provided by the present invention, a memory resource call optimization system includes:

[0061] The memory management module 101 is used to perform comprehensive monitoring of memory resources, obtain memory monitoring data, perform scheduling analysis on the memory monitoring data, and generate allocation call notifications or reclaim call notifications.

[0062] In an embodiment of the present invention, the memory management module 101 monitors multiple local memories in the memory space, obtains multiple local memory data, and then performs global collaborative decision analysis on the multiple local memory data. According to the actual memory requirements of the application, it flexibly and accurately allocates memory and generates an allocation call notification or a recycling call notification.

[0063] Specifically, in a preferred embodiment of the present invention, the memory management module 101 specifically includes:

[0064] Multiple auxiliary controllers, used for monitoring multiple local memories and obtaining multiple local memory data;

[0065] The main controller is used to perform global collaborative decision analysis on the multiple local memory data and generate an allocation call notification or a recycling call notification.

[0066] Furthermore, the memory resource call optimization system also includes:

[0067] The memory allocation module 102 is used to obtain program request information and memory status information according to the allocation call notification, and allocate a target memory block to perform memory resource configuration.

[0068] In an embodiment of the present invention, the memory allocation module 102 obtains program request information and memory status information in accordance with the allocation call notification, analyzes the program request information and memory status information based on a preset adaptive allocation algorithm or a buddy system algorithm, allocates a target memory block, and then configures memory resources for the target memory block to achieve optimal configuration of memory resources, wherein the buddy system algorithm groups memory blocks according to powers of 2, and operates on a group basis during allocation and recovery, thereby improving memory allocation efficiency and reducing memory fragmentation.

[0069] The memory recycling module 103 is used to determine a plurality of adjacent free memories according to the recycling call notification, and to compress and recycle the plurality of adjacent free memories.

[0070] In an embodiment of the present invention, the memory recycling module 103 determines multiple adjacent free memories according to the recycling call notification, and compresses and recycles the multiple adjacent free memories based on a preset mark compression algorithm or a reference counting algorithm, thereby effectively reducing the generation of memory fragmentation and ensuring the continuity and availability of the memory space. Among them, the reference counting algorithm decides whether to recycle the memory by recording the number of times the object is referenced in real time.

[0071] The memory defragmentation module 104 is used to identify a plurality of scattered memory fragments and integrate the plurality of memory fragments into an available memory block when a preset defragmentation condition is met.

[0072] In an embodiment of the present invention, when a preset memory usage threshold or memory usage cycle is reached, the memory defragmentation module 104 comprehensively traverses the memory space, identifies multiple scattered memory fragments, and then integrates the multiple memory fragments into available memory blocks, further improving memory utilization.

[0073] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0074] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0075] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A memory resource call optimization method, characterized in that: The method comprises the following steps: Perform comprehensive monitoring of memory resources, obtain memory monitoring data, perform scheduling analysis on the memory monitoring data, and generate allocation call notifications or recycling call notifications; According to the allocation call notification, program request information and memory status information are obtained, and a target memory block is allocated to perform memory resource configuration; According to the recycling call notification, multiple adjacent free memories are determined, and the multiple adjacent free memories are compressed and recycled; When a preset defragmentation condition is reached, a plurality of scattered memory fragments are identified, and the plurality of memory fragments are integrated into an available memory block.

2. The memory resource call optimization method according to claim 1, characterized in that: The comprehensive monitoring of memory resources, obtaining memory monitoring data, performing scheduling analysis on the memory monitoring data, and generating allocation call notifications or recycling call notifications specifically include the following steps: Monitor multiple local memories and obtain multiple local memory data; A global collaborative decision analysis is performed on the plurality of local memory data to generate an allocation call notification or a recycling call notification.

3. The memory resource call optimization method according to claim 1, characterized in that: The step of obtaining program request information and memory status information according to the allocation call notification and allocating a target memory block for memory resource configuration specifically includes the following steps: According to the allocation call notification, program request information and memory status information are obtained; Based on a preset adaptive allocation algorithm, the program request information and the memory status information are analyzed to allocate a target memory block; Memory resources are configured for the target memory block.

4. The memory resource call optimization method according to claim 1, characterized in that: The step of obtaining program request information and memory status information according to the allocation call notification and allocating a target memory block for memory resource configuration specifically includes the following steps: According to the allocation call notification, program request information and memory status information are obtained; Based on a preset buddy system algorithm, the program request information and the memory status information are analyzed, and a target memory block is allocated; Memory resources are configured for the target memory block.

5. The memory resource call optimization method according to claim 1, characterized in that: The step of determining a plurality of adjacent free memories according to the recycling call notification and compressing and recycling the plurality of adjacent free memories specifically comprises the following steps: According to the recycling call notification, determining a plurality of adjacent free memories; Based on the preset mark compression algorithm, multiple adjacent free memories are compressed and recycled.

6. The memory resource call optimization method according to claim 1, characterized in that: The step of determining a plurality of adjacent free memories according to the recycling call notification and compressing and recycling the plurality of adjacent free memories specifically comprises the following steps: According to the recycling call notification, determining a plurality of adjacent free memories; Based on the preset reference counting algorithm, multiple adjacent free memories are compressed and recycled.

7. The memory resource call optimization method according to claim 1, characterized in that: The method of identifying a plurality of scattered memory fragments and integrating the plurality of memory fragments into an available memory block when a preset defragmentation condition is reached specifically comprises the following steps: When the preset memory usage threshold is reached, the memory space is fully traversed to identify multiple scattered memory fragments; The plurality of memory fragments are integrated into an available memory block.

8. The memory resource call optimization method according to claim 1, characterized in that: The method of identifying a plurality of scattered memory fragments and integrating the plurality of memory fragments into an available memory block when a preset defragmentation condition is reached specifically comprises the following steps: When the preset memory usage cycle is reached, the memory space is fully traversed to identify multiple scattered memory fragments; The plurality of memory fragments are integrated into an available memory block.

9. A memory resource call optimization system, characterized in that: The system includes a memory management module, a memory allocation module, a memory recovery module and a memory defragmentation module, wherein: A memory management module is used to perform comprehensive monitoring of memory resources, obtain memory monitoring data, perform scheduling analysis on the memory monitoring data, and generate allocation call notifications or reclaim call notifications; A memory allocation module, used to obtain program request information and memory status information according to the allocation call notification, and allocate a target memory block for memory resource configuration; A memory recycling module, used to determine a plurality of adjacent free memories according to the recycling call notification, and to compress and recycle the plurality of adjacent free memories; The memory defragmentation module is used to identify multiple scattered memory fragments when a preset defragmentation condition is reached, and integrate the multiple memory fragments into an available memory block.

10. The memory resource call optimization system according to claim 9, characterized in that: The memory management module specifically includes: Multiple auxiliary controllers, used for monitoring multiple local memories and obtaining multiple local memory data; The main controller is used to perform global collaborative decision analysis on the multiple local memory data and generate an allocation call notification or a recycling call notification.

Citation Information

Cited By

  • Memory resource allocation method and device, storage medium and program product

    CN120743553A

  • A memory resource allocation method, device, storage medium and program product

    CN120743553B