CN113778688A - Memory management system, memory management method, and memory management device - Google Patents

Memory management system, memory management method, and memory management device Download PDF

Info

Publication number
CN113778688A
CN113778688A CN202111091447.0A CN202111091447A CN113778688A CN 113778688 A CN113778688 A CN 113778688A CN 202111091447 A CN202111091447 A CN 202111091447A CN 113778688 A CN113778688 A CN 113778688A
Authority
CN
China
Prior art keywords
memory
container
functional module
manager
present application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111091447.0A
Other languages
Chinese (zh)
Inventor
朱涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202111091447.0A priority Critical patent/CN113778688A/en
Publication of CN113778688A publication Critical patent/CN113778688A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources

Abstract

The embodiment of the application discloses a memory management system, a memory management method and a memory management device, wherein the memory management system comprises a processor, N memory managers and N functional modules, the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence mode, and N is an integer greater than 1; the processor is used for respectively distributing memory containers for the N functional modules; the first memory manager is used for allocating memory blocks for the first functional module from a first memory container corresponding to the first functional module according to the memory allocation request of the first functional module; the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules; the first functional module is used for writing data into the memory block.

Description

Memory management system, memory management method, and memory management device
Technical Field
The present invention relates to the field of chip design, and in particular, to a memory management system, a memory management method, and a memory management device.
Background
With the popularization of the 4th Generation Mobile Communication Technology (4G)/fifth Generation Mobile Communication Technology (5G) high-speed Mobile Communication and the emergence of new business models such as autopilot, industrial internet, internet of things, etc., more and more processing tasks are released to function modules.
Accordingly, when a new mobile communication service is designed, higher requirements are placed on allocation and release time of a memory, for example. The conventional memory management mechanism executed by the processor cannot meet the new requirements of the mobile communication device in terms of performance, cost, scalability, and the like.
Disclosure of Invention
The embodiment of the application provides a memory management system, a memory management method and a memory management device, which realize a hardware mechanism of memory management, and further can meet new requirements of a mobile communication device in the aspects of performance, cost, expandability and the like.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a memory management system, where the memory management system includes a processor, N memory managers, and N functional modules, where the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence, and N is an integer greater than 1;
the processor is used for respectively allocating memory containers for the N functional modules;
the first memory manager is used for allocating memory blocks for the first functional module from a first memory container corresponding to the first functional module according to a memory allocation request of the first functional module; the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules;
the first functional module is configured to write data into the memory block.
In a second aspect, an embodiment of the present application provides a memory management method, where the memory management method is applied to a memory management system, where the memory management system includes a processor, N memory managers, and N functional modules, where the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence, and N is an integer greater than 1, where the method includes:
the processor allocates memory containers for the N functional modules respectively;
a first memory manager allocates a memory block for a first functional module from a first memory container corresponding to the first functional module according to a memory allocation request of the first functional module; the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules;
and the first functional module writes data into the memory block.
In a third aspect, an embodiment of the present application provides a memory management device, where the memory management device includes: a distribution unit, N management units and N writing units, wherein N is an integer greater than 1,
the allocation unit is used for allocating memory containers to the N functional modules respectively;
the N management units are configured to allocate memory blocks to the N function modules from memory containers corresponding to the N function modules according to the memory allocation request;
the N write units are configured to write data into the memory block.
The embodiment of the application provides a memory management system, a memory management method and a memory management device, wherein the memory management system comprises a processor, N memory managers and N functional modules, the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence mode, and N is an integer greater than 1; the processor is used for respectively distributing memory containers for the N functional modules; the first memory manager is used for allocating memory blocks for the first functional module from a first memory container corresponding to the first functional module according to the memory allocation request of the first functional module; the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules; the first functional module is used for writing data into the memory block. That is to say, in the embodiment of the present application, the hardware memory management mechanism for the functional module can be implemented by the one-to-one corresponding memory manager provided for the functional module, so that the performance requirements for the CPU and the microprocessor are reduced; meanwhile, the memory manager can distribute and release the memory by taking the memory container as a unit, so that the memory power consumption is reduced, and the memory management efficiency and performance are improved. Therefore, the memory management method provided by the application realizes a hardware mechanism of memory management, and further can meet new requirements of the mobile communication device in the aspects of performance, cost, expandability and the like.
Drawings
FIG. 1 is a diagram illustrating the interaction of a software memory manager with hardware;
FIG. 2 is a first schematic diagram of the composition structure of the memory management system;
FIG. 3 is a first diagram of a memory management system;
FIG. 4 is a second schematic diagram of a memory management system;
FIG. 5 is a flow chart illustrating an implementation of a memory management method;
FIG. 6 is a diagram illustrating a variable length allocation scenario for a 32K byte memory container;
FIG. 7 is a schematic diagram of a memory management device;
fig. 8 is a second schematic structural diagram of the memory management system.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are illustrative of the relevant application and are not limiting of the application. It should be noted that, for the convenience of description, only the parts related to the related applications are shown in the drawings.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. It should also be noted that reference to the terms "first \ second \ third" in the embodiments of the present application is only used for distinguishing similar objects and does not represent a specific ordering for the objects, and it should be understood that "first \ second \ third" may be interchanged with a specific order or sequence where possible so that the embodiments of the present application described herein can be implemented in an order other than that shown or described herein.
In conventional mobile communication devices, there are mainly the following types of software-based memory management mechanisms:
1. the malloc () function in standard C, or similar embedded real-time operating system provides memory management, which most importantly causes memory fragmentation.
2. The TLSF algorithm adopts a Good-Fit distribution strategy to ensure that excessive fragments cannot be generated during the operation of the system, and the distribution and recovery time of the memory meets the time certainty requirement of an embedded real-time system. However, TLSF is complex and not easily implemented in hardware.
3. Fixed-length distributed memory pool
Because the system operates dynamically, it is difficult to accurately estimate the number of objects of each size. Only a limited number of memory pools of different sizes can be defined. The pre-allocated fixed length memory is wasted if not fully utilized.
The malloc () function and the TLSF are mainly used for allocating the memory to be used by software, and the fixed-length allocation is mainly used for allocating the memory to be used by hardware.
With the popularization of 4G/5G high-speed mobile communication and the appearance of novel business models such as automatic driving, industrial internet, Internet of things and the like, more and more Processing tasks are released to a functional module from a Central Processing Unit (CPU). For example, fig. 1 is a schematic diagram of interaction between a software memory manager and hardware, and as shown in fig. 1, a typical scenario allocates a fixed-length memory to the software memory manager, and provides the fixed-length memory for a functional module to use, so that the functional module performs data reading and writing based on the allocated memory.
When designing a new mobile communication service, new requirements are faced in the aspects of performance, cost, expandability and the like. Specifically, in terms of performance, the 5G peak rate may reach 10 Gbps. Higher requirements are put on the allocation and release time of the memory. If processed by software, it will put high demands on the processing power of the CPU. In terms of cost, the baseband processor should reduce the need for the size of Dynamic Random Access Memory (DRAM). Particularly for mobile communication devices of the type M2M (Machine), Internet of Things (IOT) devices. On the premise of meeting the application function, the capacity of the DRAM of the mobile equipment is controlled, and further the cost is controlled. And in the aspects of expandability and maintainability, the memory management mechanism is unified. Different processors use the same memory management mechanism across different processor platforms, and maintenance work is simplified.
At present, the conventional memory management mechanism cannot meet the new requirements of the mobile communication device in terms of performance, cost, scalability, and the like.
In order to solve the above problems, in the embodiments of the present application, a hardware memory management mechanism for the functional module can be implemented by the one-to-one memory manager provided in the functional module, so that the performance requirements for the CPU and the microprocessor are reduced; meanwhile, the memory manager can distribute and release the memory by taking the memory container as a unit, so that the memory power consumption is reduced, and the memory management efficiency and performance are improved. Therefore, the memory management method provided by the application realizes a hardware mechanism of memory management, and further can meet new requirements of the mobile communication device in the aspects of performance, cost, expandability and the like.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
An embodiment of the present application provides a memory management system, fig. 2 is a schematic view of a composition structure of the memory management system, as shown in fig. 2, a memory management system 10 may include a processor 11, N memory managers 12, and N functional modules 13, where the N memory managers 12 and the N functional modules 13 may be respectively connected in a one-to-one correspondence manner, where N is an integer greater than 1.
Further, in the embodiments of the present Application, the memory management system may be in any form of a terminal, a chip, an Integrated Circuit (IC), an Application Specific Integrated Circuit (ASIC), and the like.
It should be noted that, in the embodiment of the present application, the memory manager corresponding to each functional module may be configured to manage the memory of the functional module, specifically including allocating and reclaiming the memory.
It is understood that, in the embodiment of the present application, there are a plurality of functional modules in the memory management system, and the number of the functional modules is the same as that of the memory managers, each of the functional modules is configured with a corresponding memory manager. However, in a specific implementation, besides a plurality of functional modules configured with a memory manager, a functional module not configured with a memory manager may also exist in the memory management system, and the present application is not limited to this.
For example, fig. 3 is a first schematic diagram of a memory management system, as shown in fig. 3, the memory management system may include a plurality of functional modules, such as a functional module 1, a functional module 2, and a functional module 3, where each functional module is configured with a memory manager, such as a hardware memory manager 1, a hardware memory manager 2, and a hardware memory manager 3, correspondingly.
Further, in an embodiment of the present application, the processor may be configured to allocate memory containers for the N functional modules, respectively; the first memory manager may be configured to allocate a memory block for the first functional module from a first memory container corresponding to the first functional module according to the memory allocation request of the first functional module; the first functional module may be configured to write data to the memory block.
It should be noted that, in the embodiment of the present application, the first memory manager may be any one memory container in the N memory managers, and the first functional module may be one functional module, corresponding to the first memory container, in the N functional modules.
Further, in an embodiment of the present application, the first memory container may be at least one memory container corresponding to the function module. The first memory container may be an existing memory container corresponding to the function module, or may be a new memory container acquired by the function module.
That is to say, for a first functional module in the memory management system, a first memory container may be obtained from the memory container pool in advance, and then after obtaining the memory allocation request, the corresponding first memory manager performs corresponding memory allocation processing based on the first memory container; or after the memory allocation request is obtained, a new first memory container may be obtained from the memory container pool, and the corresponding first memory manager performs corresponding memory allocation processing based on the new first memory container.
It should be noted that, in the embodiment of the present application, one functional module may correspond to at least one memory container. Specifically, each functional module in the memory management system may be pre-allocated with at least one memory container by the processor.
It is to be appreciated that in embodiments of the present application, the processor may first select at least one memory container from the pool of memory containers to assign to a functional module. That is, the memory management system is configured with a memory container pool, and a processor in the memory management system can allocate memory containers in the memory container pool to different functional modules, where different functional modules do not share the same memory container.
That is, in the embodiments of the present application, the processor is specifically configured to allocate different memory containers in the memory container pool to different functional modules. Therefore, when performing pre-allocation of the memory containers, the processor can select different memory containers from the memory container pool to allocate to different functional modules.
Further, in the embodiments of the present application, the lengths of the plurality of memory containers in the memory container pool are the same, and may all be a preset memory length, for example, the preset memory length may be 32 kilobytes (Kbytes).
It can be understood that, in the embodiment of the present application, when the processor in the memory management system allocates the memory containers to the function modules in advance from the memory container pool, different numbers of memory containers may be dynamically allocated to different function modules according to the communication capability and the rate corresponding to each function module. The minimum allocation unit may be one memory container.
Further, in the embodiment of the present application, when the memory management system initializes the system, the processor may link all available memory containers in the system to form an available container linked list. The specific memory address corresponding to each memory container can be determined by querying the available container linked list.
In an embodiment of the present application, fig. 4 is a second schematic diagram of a memory management system, as shown in fig. 4, a function module may obtain different memory containers from a memory container pool, and after the memory containers are released, the function module may also return the memory containers to the memory container pool. Specifically, the memory management system may manage the memory container pool through the configured CPU, and further complete the allocation of the memory containers to the functional modules. For example, the memory manager corresponding to the functional module 1 obtains 1 memory container from the memory container pool, and the memory manager corresponding to the functional module 2 obtains 3 memory containers from the memory container pool.
As can be seen from fig. 1, in the conventional memory management method, the memory manager manages the memory in the system as a whole. A memory pool is a contiguous segment of memory, in bytes. When the memory needs to be allocated, the memory manager searches the appropriate memory block from the whole memory pool and returns the memory block. This unified management of memory pools makes traditional memory manager implementations very complex.
It can be understood that, in the embodiment of the present application, the memory management system no longer performs unified management on the memory pool, but divides the system memory into memory containers with preset memory length in advance. The preset memory length can make the size of a memory container far larger than the request allocation size of application layer hardware or software. For example, the predetermined memory size may be 32 kilobytes (Kbytes), i.e., the size of all memory containers may be 32Kbytes, which is much larger than the size of a normal IP packet.
It is understood that, in the embodiment of the present application, the memory management system divides the system memory to obtain a plurality of memory containers, which together form a memory container pool, and then the memory containers in the memory container pool may be allocated to different functional modules.
Therefore, in the memory management method provided by the embodiment of the application, the processor only needs to simply divide the system memory to obtain a plurality of memory containers with the same size, so as to provide different memory containers for different functional modules to use. In contrast, according to the conventional memory management method, the processor needs to manage and distribute the system memory, and the memory management method provided by the application greatly simplifies the processing flow of software, so that the requirement on the performance of the software is reduced.
Further, in an embodiment of the present application, the first memory manager is specifically configured to determine, according to the memory allocation request of the first functional module, a size of a memory block required by the first functional module; and then distributing the memory blocks for the first functional module from the first memory container according to the size of the memory blocks required by the first functional module.
It should be noted that, in the embodiment of the present application, after the memory allocation request of the first functional module is obtained, the first memory manager corresponding to the first functional module may determine, according to the memory allocation request, the size of the memory that meets the memory allocation request, that is, the size of the memory block required by the first functional module is determined, and then the corresponding memory block may be obtained by dividing from the first memory container corresponding to the first functional module.
Further, in an embodiment of the present application, the first memory manager is further configured to send an allocation request to the processor when the available storage space of the first memory container is smaller than the size of the memory block required by the first functional module; the processor is further configured to allocate a new first memory container for the first functional module after receiving the allocation request.
It should be noted that, when allocating a memory to a first functional module in response to a memory allocation request of the first functional module, a first memory manager may first determine an available storage space of a first memory container corresponding to the first functional module, and if the available storage space of the first memory container cannot meet the memory allocation request of the corresponding first functional module, the first memory manager needs to request a new first memory container from a processor, so that the first memory manager may send an allocation request to the processor; accordingly, after receiving the allocation request, the processor may further reallocate a new first memory container for the first functional module, and further may enable the first memory manager to allocate a memory block for the first functional module from the new first memory container.
It can be understood that, in the embodiment of the present application, after determining the available storage space of the first memory container corresponding to the first functional module, if the available storage space of the first memory container is smaller than the size of the memory block required by the first functional module, the first memory manager may determine that the available storage space of the first memory container cannot satisfy the memory allocation request of the corresponding first functional module.
Further, in this embodiment of the application, when allocating memory to the first functional module in response to the memory allocation request of the corresponding first functional module, if the available storage space of the first memory container is greater than or equal to the size of the memory block required by the first functional module, that is, the available storage space of the first memory container can satisfy the memory allocation request of the corresponding first functional module, the first memory manager may directly allocate the memory block for the first functional module from the available storage space of the first memory container.
For example, in the embodiment of the present application, the first function module corresponds to 3 memory containers, which are a memory container 1, a memory container 2, and a memory container 3, where the memory container 1 and the memory container 2 are already completely allocated and have no available storage space, and the memory container 3 is partially allocated and has available storage space. When a memory allocation request of the first functional module is acquired, the first memory manager may first determine whether the remaining available storage space of the memory container 3 can meet the size of the memory required by the memory allocation request, and if so, a complete memory block may be allocated from the memory container 3 to respond to the memory allocation request, the first memory manager may partition the memory block from the available storage space of the memory container 3, determine the memory address of the memory block, and add 1 to the value of a counter of the memory container 3, which represents the number of allocated memory blocks; if not, i.e. a complete memory block cannot be allocated from the memory container 3 in response to the memory allocation request, the first memory manager may obtain a new first memory container, e.g. the memory container 4, from the memory container pool by sending an interrupt request to the processor, then partition the memory block from the memory container 4, determine the memory address of the memory block, and set the first value of the counter of the memory container 4, which is indicative of the allocated number of memory blocks, to 1.
It should be noted that, in this embodiment of the present application, the first memory manager is further configured to record the number of memory chunks allocated from the first memory container, and/or the number of memory chunks released by the first memory container.
Further, in an embodiment of the present application, the first memory manager is configured to, when one memory block is allocated from the first memory container, add 1 to a first value corresponding to the first memory container; wherein the first value is used to determine the number of memory chunks allocated from the first memory container.
Further, in an embodiment of the present application, the first memory manager is configured to add 1 to a second value corresponding to the first memory container when one memory block corresponding to the first memory container is released; the second value is used to determine the number of released memory blocks corresponding to the first memory container.
That is, in the embodiments of the present application, the first memory manager may determine, using the first value, the number of memory chunks allocated from the first memory container, and may also determine, using the second value, the number of released memory chunks corresponding to the first memory container.
For example, in the embodiment of the present application, for each memory container of one functional module, the corresponding memory manager may maintain two counters, where a value of one counter, that is, a first value, is used to determine the number of memory chunks allocated from the memory container, and a value of the other counter, that is, a second value, is used to determine the number of memory chunks released and returned to the memory container.
That is to say, in the embodiment of the present application, when the first memory manager maintains two counters of each memory container of the corresponding first function module, if the first memory manager allocates one memory block from one memory container, the first memory manager may add 1 to a first value, which represents the number of allocated memory blocks, corresponding to the memory container; if the first memory manager determines that a memory block is released and returned to a memory container, the first memory manager may add 1 to a second value corresponding to the memory container and representing the number of released memory blocks.
It should be noted that, in this embodiment of the application, the first functional module is further configured to send an update instruction to the first memory manager when the number of memory blocks continuously released in the first memory container reaches a number threshold; correspondingly, the first memory manager is specifically configured to update, according to the update indication, the number of memory blocks released by the first memory container.
Specifically, in this embodiment of the application, the first functional module is configured to add 1 to a third value corresponding to the first memory container when one memory block corresponding to the first memory container is released. When the third value is greater than or equal to the number threshold corresponding to the first memory container, the first functional module may further send the third value to the first memory manager.
It is to be understood that, in the embodiment of the present application, for each memory container of the first functional module, the first functional module may locally maintain a corresponding counter, such as a third counter, and a third value of the counter may be used to locally update the number of released memory blocks of the corresponding memory container. For example, every time a memory block is released from a memory container, the third value of the local counter is incremented by 1.
It should be noted that, in the embodiment of the present application, the third value may also be used to determine the number of released memory chunks corresponding to the first memory container. The third value may be a value that characterizes the number of memory blocks released by the first memory container, maintained and updated locally by the first functional module, as opposed to the second value.
It is understood that, in the embodiments of the present application, if the third value is greater than or equal to the number threshold corresponding to the first memory container, the first memory container may be considered to have completed releasing most or all of the memory chunks.
It should be noted that, in the embodiment of the present application, for each memory container, a corresponding number threshold may be set. The number threshold may be used to determine whether a memory container completes releasing most or all of the memory blocks. The number threshold values corresponding to different memory containers may be the same or different.
For example, in the embodiment of the present application, the number threshold may be set according to the number of the memory blocks divided by the corresponding memory container. For example, if the first memory container is divided into 10 memory blocks, the threshold of the number corresponding to the first memory container may be set to 10.
Further, in an embodiment of the present application, the first memory manager is specifically configured to update the second value according to the third value.
That is to say, in the embodiment of the application, when the memory blocks in the first memory container are sequentially released, the first functional module may continuously update the locally maintained third counter, until the third value is greater than or equal to the number threshold corresponding to the first memory container, and the first memory manager may further update the second value based on the third value.
It can be understood that, in the embodiment of the present application, when the third value is greater than or equal to the number threshold corresponding to the first memory container, the first functional module sends the third value to the first memory manager; and further enabling the first memory manager to update the second value according to the third value.
It should be noted that, in the embodiment of the present application, after the first memory manager receives the third value reported by the first functional module, the third value may be used to update the corresponding second value. Specifically, the first memory manager may add the third value to the initial second value, and finally complete updating the second value to determine a new second value.
That is to say, in the embodiment of the present application, when a single memory block of the first memory container is released, the first memory manager does not immediately update the second value corresponding to the first memory container, but the first functional module updates the third value corresponding to the first memory container in time, until the third value is greater than or equal to the number threshold corresponding to the first memory container, the first memory manager may further update the second value based on the third value.
For example, assuming that the number threshold is 20 and the current second value is 80, when a single memory block of the first memory container is released, the first functional module may update the third value until the third value reaches 20 (the number threshold), instruct the first memory manager to update the second value, and the first memory manager may further update the second value from 80 to 100(80+ 20).
It is understood that, in the embodiment of the present application, if the previously released memory chunk belongs to the first memory container, and the currently released memory chunk belongs to the second memory container (another memory container corresponding to the first functional module and other than the first memory container), the fourth value of the fourth counter corresponding to the second memory container may be set to 1. The fourth counter may be a counter locally maintained by the first functional module and used to determine the number of memory blocks released by the second memory container, and the fourth value may be used to determine the number of released memory blocks corresponding to the second memory container.
That is to say, in the embodiment of the present application, if the currently released memory chunk and the previously released memory chunk do not belong to the same memory container, the first functional module may maintain a counter of the memory container to which the currently released memory chunk belongs, where the counter is used to locally update the number of released memory chunks, and then set the value of the counter to 1.
For example, in the embodiment of the present application, if it is determined that the last released memory chunk belongs to the first memory container and the currently released memory chunk belongs to the second memory container, the first memory manager does not immediately update the value of the counter, which is corresponding to the second memory container and is used to represent the number of released memory chunks, but sets a fourth value, which is corresponding to the second memory container and is maintained locally by the first functional module, to 1, and then continues to process the next memory chunk to be released. If the next released memory block also belongs to the second memory container, the first memory manager still does not immediately update the value of the counter corresponding to the second memory container and representing the number of the released memory blocks, but selects the first functional module to add 1 to the fourth value of the fourth counter until the fourth value is greater than or equal to the threshold value of the number corresponding to the second memory container.
Therefore, according to the memory management method provided by the embodiment of the application, the number of the released memory blocks is updated by locally maintaining the counter through the first functional module, so that the time spent by the first functional module in releasing the memory can be greatly reduced in the memory releasing process, the operation of a memory container on the counter during releasing the memory is reduced, the memory bandwidth is saved, and the memory access power consumption is reduced.
Further, in an embodiment of the present application, the first memory manager is further configured to, if the number of the memory chunks allocated from the first memory container is the same as the number of the memory chunks released by the first memory container, cyclically use the first memory container; alternatively, the first memory container is released.
It should be noted that, in the embodiment of the present application, the first memory manager may release the first memory container to the memory container pool.
It can be understood that, in the embodiment of the present application, if the number of the memory chunks allocated from the first memory container is the same as the number of the memory chunks released from the first memory container, it indicates that the first memory container does not store the data written by the first functional module.
In this case, the first memory manager may choose to continue responding to the memory allocation request based on the first memory container, that is, the memory manager recycles the first memory container, or may choose to not reuse the first memory container, that is, the first memory manager returns the first memory container to the memory container pool.
That is, in the embodiment of the present application, when the first value and the second value corresponding to the first memory container are the same, it is determined that all the memory blocks allocated from the first memory container have been released, and therefore, the first memory manager may select to recycle the first memory container or release the first memory container back to the memory container pool of the memory management system.
The embodiment of the application provides a memory management system, which comprises a processor, N memory managers and N functional modules, wherein the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence manner, and N is an integer greater than 1; the processor is used for respectively distributing memory containers for the N functional modules; the first memory manager is used for allocating memory blocks for the first functional module from a first memory container corresponding to the first functional module according to the memory allocation request of the first functional module; the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules; the first functional module is used for writing data into the memory block. That is to say, in the embodiment of the present application, the hardware memory management mechanism for the functional module can be implemented by the one-to-one corresponding memory manager provided for the functional module, so that the performance requirements for the CPU and the microprocessor are reduced; meanwhile, the memory manager can distribute and release the memory by taking the memory container as a unit, so that the memory power consumption is reduced, and the memory management efficiency and performance are improved. Therefore, the memory management method provided by the application realizes a hardware mechanism of memory management, and further can meet new requirements of the mobile communication device in the aspects of performance, cost, expandability and the like.
Based on the foregoing embodiment, another embodiment of the present application provides a memory management method, which may be applied to a memory management system, where the memory management system includes a processor, N memory managers, and N functional modules, where the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence, and N is an integer greater than 1.
Fig. 5 is a schematic flow chart of an implementation of the memory management method, as shown in fig. 5, in an embodiment of the present application, a method for performing memory management by a memory management system may include the following steps:
in step 101, the processor allocates memory containers for the N functional modules, respectively.
In the embodiment of the present application, for each functional module in the memory management system, the processor may allocate at least one memory container to the functional module from the memory container pool in advance, that is, the processor may allocate a memory container to the functional module from the memory container pool in advance, so that memory allocation to the functional module may be completed.
It should be noted that, in the embodiment of the present application, the memory containers corresponding to different functional modules are different, that is, any two functional modules do not share the same memory container.
Further, in the embodiments of the present application, the lengths of the plurality of memory containers in the memory container pool are the same, and may all be a preset memory length, for example, the preset memory length may be 32 kilobytes (Kbytes).
It can be understood that, in the embodiment of the present application, when the processor allocates the memory containers to the function modules from the memory container pool in advance, different numbers of memory containers may be dynamically allocated to different function modules according to the communication capability and the rate corresponding to each function module. The minimum allocation unit may be one memory container.
Further, in the embodiment of the present application, when the system is initialized, the memory management system may link all available memory containers in the system through software to form an available container linked list. The specific memory address corresponding to each memory container can be determined by querying the available container linked list.
102, allocating, by a first memory manager, a memory block for a first functional module from a first memory container corresponding to the first functional module according to a memory allocation request of the first functional module; the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules.
In an embodiment of the present application, the first memory manager may allocate a memory block for the functional module from a first memory container corresponding to the first functional module according to the memory allocation request of the corresponding first functional module.
It can be understood that, in the embodiment of the present application, the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules.
It should be noted that, in the embodiment of the present application, the first memory manager may first determine, according to the memory allocation request of the corresponding first functional module, the size of the memory block required by the first functional module; the memory blocks may then be allocated for the first functional module from the first memory container according to the size of the memory blocks required by the first functional module.
It can be understood that, in the embodiment of the present application, when the available storage space of the first memory container corresponding to the first functional module is smaller than the size of the memory block required by the first functional module, the first memory manager sends an allocation request to the processor; accordingly, after receiving the allocation request, the processor allocates a new first memory container to the first functional module, so that the first memory manager can allocate a memory block to the functional module from the new first memory container.
And 103, writing data into the memory block by the first functional module.
In the embodiment of the present application, after the first memory manager responds to the corresponding memory allocation request and allocates the memory block to the first functional module, the first functional module may write data into the memory block.
Further, in the embodiment of the present application, the first memory manager may record the number of memory chunks allocated from the memory container and the number of memory chunks returned to the memory container by using two different values. For example, the first memory manager may use the first value to determine the number of memory chunks allocated from the first memory container, while the second value may use the second value to determine the number of released memory chunks corresponding to the first memory container.
That is, in the embodiment of the present application, the first memory manager may further record the number of memory chunks allocated from the first memory container, and/or the number of memory chunks released by the first memory container.
It should be noted that, in the embodiment of the present application, when a memory block is allocated from a first memory container, a first memory manager adds 1 to a first value corresponding to the first memory container; when a memory block corresponding to the first memory container is released, the first memory manager adds 1 to the second value corresponding to the first memory container.
Further, in this embodiment of the application, when the number of the memory blocks continuously released in the first memory container reaches the number threshold, the first functional module may further send an update indication to the first memory manager; accordingly, the first memory manager may update the number of memory chunks released by the first memory container according to the update indication.
That is to say, in the embodiment of the present application, the first functional module may also locally maintain a third numerical value different from the second numerical value, so as to record the number of the memory blocks returned to the first memory container. Specifically, when a memory block corresponding to the first memory container is released, the first functional module adds 1 to a third numerical value corresponding to the first memory container; when the third value is greater than or equal to the number threshold corresponding to the first memory container, the first functional module sends the third value to the first memory manager, so that the first memory manager can update the second value according to the third value.
Further, in the embodiment of the present application, if the number of the memory blocks allocated from the first memory container is the same as the number of the memory blocks released by the first memory container, the first memory manager recycles the first memory container; alternatively, the first memory container is released.
It should be noted that, in the embodiment of the present application, the first memory manager may release the first memory container to the memory container pool.
It is understood that, in the embodiment of the present application, if the first value is the same as the second value, it may be considered that all the memory blocks allocated by the first memory container have been released and returned, at this time, the first memory manager may select to continue to respond to the memory allocation request based on the first memory container, that is, the memory manager cyclically uses the first memory container, or select not to use the first memory container, that is, the first memory manager returns the first memory container to the memory container pool.
Another embodiment of the present application provides a memory management method, which may be applied to a memory management system, where each of a plurality of functional modules in the memory management system is configured with a memory manager, that is, the plurality of memory managers and the plurality of functional modules are respectively connected in a one-to-one correspondence manner.
It should be noted that, in the embodiment of the present application, the memory manager corresponding to each functional module may be configured to manage the memory of the functional module, specifically including allocating and reclaiming the memory.
Further, in this embodiment of the present application, for each memory manager, two counters of a corresponding memory container may also be maintained, where a value of one counter, that is, a first value, may be used to determine the number of memory chunks allocated from the memory container, and a value of the other counter, that is, a second value, may be used to determine the number of memory chunks released and returned to the memory container.
Further, in an embodiment of the present application, the memory management system may further include a processor, where the processor may be configured to perform pre-allocation processing on the memory container for different functional modules.
It should be noted that, in the embodiment of the present application, the first memory manager may be any one of a plurality of memory managers, and the first functional module may be one of a plurality of functional modules that is correspondingly connected to the first memory manager.
Further, in an embodiment of the present application, a method for performing memory management by a memory management system may include the following steps:
step 201, in response to a memory allocation request of a first functional module, a first memory manager performs memory partitioning based on a first memory container corresponding to the first functional module, determines a memory address of a memory block corresponding to the memory allocation request, and updates a first value of a first counter corresponding to the first memory container; wherein the first value is used to determine the number of memory chunks allocated from the first memory container.
In an embodiment of the present application, after a memory allocation request of a first functional module in a memory management system is obtained, a first memory manager in the memory management system may perform, in response to the memory allocation request, memory partitioning processing based on a first memory container corresponding to the first functional module, so as to determine a memory address of a corresponding memory block that meets the memory allocation request, and then may perform update processing on a first value of a first counter corresponding to the first memory container.
It is understood that in the embodiments of the present application, the memory management system may be various electronic devices having a communication function, including but not limited to mobile electronic devices such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a vehicle-mounted electronic device (e.g., a car navigation electronic device), and the like, and fixed electronic devices such as a Digital Television (TV), a desktop computer, and the like.
Further, in this embodiment of the present application, after the memory allocation request of the first functional module is obtained, the first memory manager corresponding to the first functional module may determine, according to the memory allocation request, the size of the memory that meets the memory allocation request, and then may obtain the corresponding memory block by dividing the memory block from the first memory container corresponding to the first functional module, that is, determine the memory address of the memory block that meets the memory allocation request.
It should be noted that, in the embodiment of the present application, one functional module may correspond to at least one memory container. Specifically, each functional module in the memory management system may be pre-allocated with at least one memory container.
It is to be understood that, in the embodiment of the present application, the function module may first acquire at least one memory container from the memory container pool. That is to say, the memory management system is configured with a memory container pool, and a processor in the memory management system may allocate memory containers in the memory container pool to different functional modules in advance, where different functional modules do not share the same memory container.
Further, in response to the memory allocation request of the first function module, before the first memory manager performs memory partitioning based on the first memory container corresponding to the first function module, determines a memory address of the memory block corresponding to the memory allocation request, and updates the first value of the first counter corresponding to the first memory container, that is, before step 201, the method for performing memory management by the memory management system may further include the following steps:
in step 204, the processor allocates at least one memory container from the memory container pool to the first functional module to complete memory allocation to the first functional module.
In the embodiment of the present application, for each functional module in the memory management system, the processor may allocate, in advance, at least one corresponding memory container from the memory container pool to the functional module, that is, the processor in the memory management system may allocate, in advance, a memory container from the memory container pool to the functional module, so that memory allocation to the functional module may be completed.
It should be noted that, in the embodiment of the present application, the memory containers corresponding to different functional modules are different, that is, any two functional modules do not share the same memory container.
Further, in an embodiment of the present application, the first memory container may be at least one memory container corresponding to the first function module. The first memory container may be an existing memory container corresponding to the first functional module, or may be a new memory container acquired by the first functional module.
It should be noted that, in the embodiment of the present application, for each memory container of one functional module, the corresponding memory manager may maintain two counters, where a value of one counter, that is, a first value, is used to determine the number of memory blocks allocated from the memory container, and a value of the other counter, that is, a second value, is used to determine the number of memory blocks released and returned to the memory container.
For example, in the embodiment of the present application, the identification information allocated _ counter may be used to indicate the number of memory blocks that have been allocated from one container, i.e. a first numerical value; the identification information free _ counter indicates how many memory blocks the application has released to return to one memory container, i.e. the second value.
It is understood that, in the embodiments of the present application, for a first memory container, a first value of a first counter may be used to determine the number of memory chunks allocated from the first memory container, and a second value of a second counter may be used to determine the number of released memory chunks corresponding to the first memory container.
It is understood that, in the embodiment of the present application, when one memory block is allocated from the first memory container, 1 is added to the first value; and when one memory block corresponding to the first memory container is released, adding 1 to the second value.
That is to say, in the embodiment of the present application, when the first memory manager maintains two counters of each memory container of the corresponding first function module, if the first memory manager allocates one memory block from one memory container, the first memory manager may add 1 to a first value, which represents the number of allocated memory blocks, corresponding to the memory container; if the first memory manager determines that a memory block is released and returned to a memory container, the first memory manager may add 1 to a second value corresponding to the memory container and representing the number of released memory blocks.
Further, in the embodiment of the present application, the first memory container may be an existing memory container corresponding to the first function module, or may be a new memory container acquired by the first function module. Specifically, the method for the first memory manager to partition the memory based on the first memory container corresponding to the first function module, determine the memory address of the memory block corresponding to the memory allocation request, and update the first value of the first counter corresponding to the first memory container may include the following steps:
step 301, determining an available storage space of a first memory container.
Step 302, if the available storage space meets the allocation condition corresponding to the memory allocation request, determining the memory address of the memory block from the available storage space, and updating the first counter of the first memory container.
Step 303, if the available storage space does not satisfy the allocation condition corresponding to the memory allocation request, obtaining a new first memory container from the memory container pool, determining the memory address of the memory block from the new first memory container, and updating the first value of the first counter of the new first memory container.
In an embodiment of the present application, after the first functional module obtains the memory allocation request, the first memory manager may first determine an available storage space of the first memory container corresponding to the first functional module. If the available storage space of the first memory container meets the allocation condition corresponding to the memory allocation request, the first memory manager can directly determine the memory address of the memory block from the available storage space, and then update the first counter of the first memory container; if the available storage space of the first memory container does not satisfy the allocation condition corresponding to the memory allocation request, the first memory manager needs to acquire a new first memory container from the memory container pool, determine the memory address of the memory block from the new first memory container, and update the first counter of the new first memory container.
It should be noted that, in the embodiment of the present application, after determining the available storage space of the first memory container, that is, determining the size of the remaining allocable memory of the first memory container, the first memory manager may first determine whether the available storage space meets an allocation condition corresponding to the memory allocation request. Specifically, if the available storage space is sufficient to meet the requirement of the memory allocation request on the size of the memory, it may be considered that the available storage space can meet the allocation condition corresponding to the memory allocation request; if the available storage space cannot meet the requirement of the memory allocation request on the size of the memory, it may be considered that the available storage space cannot meet the allocation condition corresponding to the memory allocation request.
It is understood that, in the embodiment of the present application, if it is determined that the available storage space of the first memory container can satisfy the memory allocation request to perform the allocation of the memory block, the first memory manager may perform the memory allocation directly based on the first memory container, that is, may directly allocate a complete memory block from the available storage space of the first memory container to respond to the memory allocation request.
It can be understood that, in the embodiment of the present application, if it is determined that the available storage space of the first memory container cannot allocate a complete memory block to respond to the memory allocation request, the first memory manager needs to acquire a new first memory container, specifically, may acquire the new first memory container from the memory container pool, and then perform memory allocation based on the new first memory container, that is, allocate a complete memory block from the newly acquired memory to respond to the memory allocation request.
It should be noted that, in the embodiment of the present application, when the first memory manager acquires a new first memory container, the first memory manager may send an allocation request to the processor; accordingly, after receiving the allocation request, the processor allocates a new first memory container to the first functional module, so that the first memory manager can allocate a memory block to the first functional module from the new first memory container.
Step 202, when it is determined that the memory block corresponding to the first memory container is released according to the released memory address, the first memory manager updates a second numerical value of a second counter corresponding to the first memory container; the second value is used to determine the number of released memory blocks corresponding to the first memory container.
In an embodiment of the present application, after a first memory manager in the memory management system responds to a memory allocation request of a first function module, performs memory partitioning based on a first memory container corresponding to the first function module, determines a memory address of a memory block corresponding to the memory allocation request, and updates a first value of a first counter corresponding to the first memory container, and when it is determined that the memory block corresponding to the first memory container is released according to the released memory address, the first memory manager may update a second value of a second counter corresponding to the first memory container.
It should be noted that, in the embodiment of the present application, when a memory block is released, the first memory manager may first determine, according to a memory address of the memory block, to which memory container the released memory block belongs, and then may update a second value of a counter, which is used for representing the number of the released memory blocks, of the corresponding memory container.
It is understood that, in the embodiment of the present application, if it is determined that one memory chunk corresponding to the first memory container has been released according to the released memory address, the first memory manager may add 1 to the second value corresponding to the first memory container, which is used to determine the number of released memory chunks corresponding to the first memory container. For example, the first functional module corresponds to 2 memory containers, which are a memory container 1 and a memory container 2, respectively, and when the memory block 1 is released, the first memory manager determines that the memory block 1 belongs to the memory container 2 according to the memory address corresponding to the memory block 1, so that the first memory manager may directly add 1 to the second number of the counter, representing the number of the released memory blocks, of the memory container 2; when the memory block 5 is released, the first memory manager determines, according to the memory address corresponding to the memory block 5, that the memory block 5 belongs to the memory container 1, and then the first memory manager may directly add 1 to the second number of the counter, which represents the number of the released memory blocks, of the memory container 1.
Considering that the memory management system continuously receives data packets, continuously allocates memory, continuously processes the data packets, and finally continuously releases the memory, it can be considered that most of the packet data in the memory management system and the packet data before and after the packet data have an association relationship in the memory space. Furthermore, in the embodiment of the present application, when a single memory is released, the memory manager in the memory management system may also select not to immediately execute the second value updating process of the counter of the corresponding memory container, but select to update the second value of the corresponding counter after the plurality of memory blocks corresponding to the same memory container are sequentially released, so that the update processing flow may be greatly reduced, and the memory bandwidth may be reduced.
It is understood that, in an embodiment of the present application, when it is determined that the memory block corresponding to the first memory container is released according to the released memory address, the method for the first memory manager to update the second value of the second counter corresponding to the first memory container may include the following steps:
step 202a, after determining that the previous memory block belongs to the first memory container according to the previously released memory address, if determining that the current memory block belongs to the first memory container according to the currently released memory address, the first functional module performs processing of adding 1 to a third numerical value of a third counter corresponding to the first memory container.
In this embodiment of the present application, if it is determined that the previously released memory block belongs to the first memory container according to the previously released memory address, and it is determined that the currently released memory block also belongs to the first memory address according to the currently released memory address, the first functional module may add 1 to the third numerical value of the third counter corresponding to the first memory container.
It should be noted that, in the embodiment of the present application, the third value of the third counter is a memory block number, which is locally maintained by the first functional module and used for determining the release of the first memory container.
Step 202b, when the third value is greater than or equal to the number threshold corresponding to the first memory container, the first memory manager updates the second value according to the third value.
In an embodiment of the application, when the third value is greater than or equal to the number threshold corresponding to the first memory container, the first memory manager may update the second value according to the third value.
It should be noted that, in the embodiment of the present application, for each memory container, a corresponding number threshold may be set. The number threshold may be used to determine whether a memory container completes releasing most or all of the memory blocks. The number threshold values corresponding to different memory containers may be the same or different.
It is understood that, in the embodiments of the present application, if the third value is greater than or equal to the number threshold corresponding to the first memory container, it may be considered that the first memory container has completed releasing most or all of the memory blocks, and therefore, the second value may be further determined according to the third value.
That is, in the embodiment of the present application, when a single memory block of a first memory container is released, the first memory manager does not immediately update the second counter of the first memory container, but selects a third counter, which is a context maintained locally by the first functional module in the first memory container, and updates the third value of the third counter by the first functional module, and then continues to process the next memory block to be released. If the next memory block to be released still belongs to the first memory container, the first memory manager still does not immediately update the second counter of the first memory container, but selects the first functional module to add 1 to the third value of the third counter.
It should be noted that, in the embodiment of the present application, when the first memory manager updates the second value according to the third value, the first memory manager may add the third value and the original second value, and finally complete the update of the second value to determine a new second value.
It is understood that, in the embodiment of the present application, after determining that the previous memory block belongs to the first memory container according to the previously released memory address, if it is determined that the current memory block belongs to the second memory container according to the currently released memory address, the fourth value of the fourth counter corresponding to the second memory container may be set to 1.
It should be noted that, in the embodiment of the present application, the second memory container is another memory container, other than the first memory container, in the at least one memory container corresponding to the first function module. The fourth counter may be a counter locally maintained by the first functional module for determining the number of memory blocks released by the second memory container.
That is to say, in the embodiment of the present application, if the currently released memory chunk and the previously released memory chunk do not belong to the same memory container, the counter of the memory container to which the currently released memory chunk belongs, which is used for locally updating the number of released memory chunks of the memory container, may be maintained locally again, and then the value is set to 1.
For example, in this embodiment of the present application, if it is determined that the last released memory chunk belongs to the first memory container and the currently released memory chunk belongs to the second memory container, the first memory manager does not immediately update the value of the counter, which is corresponding to the second memory container and is used to characterize the number of released memory chunks, but sets a fourth value, which is corresponding to the second memory container and is maintained locally by the first functional module, to 1, and then continues to process the next memory chunk to be released. If the next released memory block also belongs to the second memory container, the first memory manager still does not immediately update the value of the counter corresponding to the second memory container and representing the number of the released memory blocks, but selects the first functional module to add 1 to the fourth value of the fourth counter until the fourth value is greater than or equal to the threshold value of the number corresponding to the second memory container.
In step 203, if the first value is the same as the second value, the first memory container is recycled, or the first memory container is released.
In this embodiment of the present application, after the first memory manager in the memory management system completes the allocation and the release of the memory of the corresponding first function module according to the above step 201 and step 202, and updates the first value and the second value corresponding to the first function module, if the first value and the second value are the same, the first memory manager may select to cyclically use the first memory container, or release the first memory container.
It is understood that, in the embodiment of the present application, the first memory manager may choose to continue the response of the memory allocation request based on the first memory container, that is, the first memory manager recycles the first memory container.
It is understood that, in the embodiment of the present application, the first memory manager may also choose to not use the first memory container any more, that is, the first memory manager returns the first memory container to the memory container pool.
That is to say, in the embodiment of the present application, when the first value and the second value corresponding to the first memory container are the same, it may be determined that all the memory blocks allocated from the first memory container have been released, and at this time, the first memory manager may select to continue to respond to the memory allocation request based on the first memory container, that is, the memory manager cyclically uses the first memory container, or select to no longer use the first memory container, that is, the first memory manager returns the first memory container to the memory container pool.
To sum up, based on the memory management methods provided in the foregoing steps 201 to 204 and 301 to 303, the memory management can be implemented as hardware by setting a corresponding memory manager for the functional module, that is, the memory management method provided in the present application is a memory management mechanism implemented based on hardware; compared with a common memory management mechanism based on software, in the application, memory management can be performed based on the memory container as a basic unit. The method comprises the following steps that (1) fixed-length distribution and variable-length distribution can be flexibly supported through independent configuration of each memory manager instance, and distribution release time is unchanged; memory fragments are not generated; the complexity of hardware is reduced, and the realizability is greatly improved; the distribution and release efficiency is greatly improved, and the memory distribution and release can be completed only by a plurality of clocks; furthermore, the performance of memory management can be greatly improved by configuring the memory containers in advance.
Furthermore, the memory management method provided by the embodiment of the application can support a fully hardened 4G/5G baseband processor data processing path scheme; compared with the traditional malloc/TLSF mechanism, the complexity of memory management is greatly reduced: the linked list structure is not required to be managed by hardware, and the descriptor management problem caused by the variable-length linked list is solved; and the merging and fragmentation processing of the free memory are not required to be performed by hardware. And thus the realizability of hardware is enhanced.
Furthermore, in the memory management method provided in the embodiment of the present application, the memory allocation mechanism for the functional modules is implemented by the memory managers corresponding to one another, so that the allocation and release efficiency is greatly improved, and the memory allocation and release can be completed only in a few clock cycles; furthermore, memory management in the transmission process of 4G/5G, USB/PCIe can be synchronously processed without software participation. The CPU and the microprocessor are not required to participate in high-speed real-time memory management to reduce the load of the CPU and the microprocessor in the system; thus reducing CPU and microprocessor and performance requirements.
Further, the Memory management method provided in the embodiment of the present application can rapidly allocate and release the Memory by setting a hardware Memory management mechanism of the corresponding Memory manager for the functional module, and the recycled Static Random-Access Memory (SRAM) Memory can be rapidly reused, so that the power consumption of the overall Memory of the system can be reduced by about 30 to 40% at the peak rate, and the Memory power consumption can be effectively reduced.
The embodiment of the application provides a memory management method, which is applied to a memory management system, wherein the memory management system comprises a processor, N memory managers and N functional modules, the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence manner, and N is an integer greater than 1; the processor is used for respectively distributing memory containers for the N functional modules; the first memory manager is used for allocating memory blocks for the first functional module from a first memory container corresponding to the first functional module according to the memory allocation request of the first functional module; the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules; the first functional module is used for writing data into the memory block. That is to say, in the embodiment of the present application, the hardware memory management mechanism for the functional module can be implemented by the one-to-one corresponding memory manager provided for the functional module, so that the performance requirements for the CPU and the microprocessor are reduced; meanwhile, the memory manager can distribute and release the memory by taking the memory container as a unit, so that the memory power consumption is reduced, and the memory management efficiency and performance are improved. Therefore, the memory management method provided by the application realizes a hardware mechanism of memory management, and further can meet new requirements of the mobile communication device in the aspects of performance, cost, expandability and the like.
Based on the foregoing embodiment, a memory management method provided in another embodiment of the present application is applied to a communication device configured with a memory management system, where the memory management system includes a processor, N memory managers, and N functional modules, the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence, and N is an integer greater than 1. Specifically, in the present application, the memory manager corresponding to each functional module may be a hardware variable-length memory manager, and can respond to the memory allocation request of the functional module to divide the memory blocks of corresponding lengths from the memory containers corresponding to the functional module.
Further, in an embodiment of the present application, a method for memory management of a communication device may include the following steps:
step 401, at least one memory container is allocated to the functional module.
In an embodiment of the present application, the communication device may assign at least one memory container to at least one of the configured functional modules in advance.
It can be understood that, in the embodiment of the present application, the memory management system may perform partitioning processing on the system memory in advance, and obtain a plurality of memory containers to store in the memory container pool. The lengths of the plurality of memory containers in the memory container pool are the same, and may be all preset memory lengths, and the preset memory length may be 32 Kbytes.
Further, in the embodiment of the present application, after the system memory is divided, the processor in the memory management system may allocate a memory container to the functional module in advance, where the minimum allocation unit may be one memory container.
It can be understood that, in the embodiment of the present application, the communication device may allocate the memory container to only a part of the function modules, or may allocate the memory container to all the function modules; the communication device may allocate one memory container to the function module in advance, or may allocate a plurality of memory containers to the function module in advance.
It should be noted that, in the embodiment of the present application, the communication device may allocate one or more memory containers to the memory manager corresponding to the functional module. Each functional module is provided with an independent memory manager instance, and different functional modules do not share a memory container, so that mutual exclusion operation of memory allocation can be effectively avoided, and performance is improved.
Further, in the embodiment of the present application, the size of each memory container may be a preset memory length, and the preset memory length may be set to be far greater than the size of the memory block allocated by the single application, that is, the size of the memory container is far greater than the size of the memory block allocated by the single application, so that the memory manager may allocate the memory based on the granularity of the memory container when allocating the memory, thereby greatly reducing the allocation times, reducing the interaction of software and hardware, and further reducing the burden of the CPU.
It can be understood that, in the embodiment of the present application, the process of allocating the memory container to the function module is executed before the function module obtains the memory allocation request, and compared with a conventional memory management mechanism in which the memory block is searched in the memory pool only when the memory block is allocated by the user request is received, the memory management method provided in the present application reduces the allocation delay of the 5G high-speed communication by executing the allocation process of the memory container in advance.
Further, in the embodiment of the present application, each functional module is configured with a hardware memory manager for performing memory partitioning processing, so that the communication device no longer needs to perform memory allocation of all functional modules through a processor, and the processor only needs to partition a system memory into memory containers with fixed lengths, so that implementation of software is very simple.
It should be noted that, in the embodiment of the present application, the communication device may link all available memory containers in the system through the processor to form the available container linked list at the time of system initialization.
Step 402, when a memory allocation request of a function module is obtained, the memory manager determines a target memory container based on at least one memory container corresponding to the function module.
In an embodiment of the present application, when a memory allocation request of a functional module is obtained, a corresponding memory manager may first determine a target memory container in at least one memory container corresponding to the functional module. The target memory container can be an existing memory container of the functional module, and can also be a new memory container newly acquired by the functional module; the target memory container is used to respond to the memory allocation request.
Specifically, in the embodiment of the present application, after the memory allocation request of the functional module is obtained, the memory manager may first determine an available storage space of an existing memory container corresponding to the functional module. If the available storage space of the existing memory container meets the allocation condition corresponding to the memory allocation request, the memory manager can directly determine the existing memory container as a corresponding target memory container; if the available storage space of the existing memory container does not satisfy the allocation condition corresponding to the memory allocation request, the memory manager needs to first acquire a new memory container from the memory container pool, and determine the new memory container as the corresponding target memory container.
That is to say, in the embodiment of the present application, if it is determined that the available storage space of an existing memory container can meet the memory allocation request to allocate the memory blocks, the memory manager may use the existing memory container as the target memory container; if it is determined that the available storage space of the existing memory container cannot allocate a complete memory block in response to the memory allocation request, the memory manager may use the newly acquired memory container as the target memory container. That is, if the remaining space of the existing memory container of the functional module is insufficient and a complete memory block cannot be allocated to the requester, the memory manager needs to apply for a new memory container for memory allocation.
Step 403, the memory manager determines the memory address of the memory block from the target memory container, and updates the first value of the first counter of the target memory container.
In an embodiment of the present application, after determining the target memory container corresponding to the function module, the memory manager may determine a memory address of the memory block from the target memory container in response to the memory allocation request, and update the first value of the first counter of the target memory container.
It should be noted that, in the embodiment of the present application, since the capacity of one memory container is much larger than the size of a normal user request, that is, one container may be allocated multiple times, the memory manager may directly find a segment of available memory from one memory container for responding to a memory allocation request.
It is understood that, in the embodiment of the present application, in response to different memory allocation requests, the sizes of the memory blocks divided by the memory manager may be different, that is, the memory manager may perform variable-length memory allocation processing.
In an embodiment of the present application, fig. 6 is a schematic diagram of a variable length allocation scenario of a 32kbyte memory container, as shown in fig. 6, in response to memory allocation requests of different application layer hardware or software, the size of each small memory block allocated from the memory container by a memory manager is not fixed, such as memory block 1, memory block 2, … …, and memory block 6. And because the size of the 32Kbytes memory container is far larger than the request allocation size of application layer hardware or software, after multiple allocations, the memory container still has available storage space for the allocation processing to continue.
Therefore, in the embodiment of the application, compared with a fixed-length memory allocation mode, the memory manager can greatly improve the use efficiency of the memory by using a variable-length memory allocation scheme.
Further, in embodiments of the present application, for each memory container, the memory manager instance may maintain a first value of a first counter used to determine a number of memory chunks allocated from the memory container. Wherein the identification information allocated _ counter may be used to indicate the number of memory blocks that have been allocated from a container.
For example, in the embodiment of the present application, when one memory block is allocated from the memory container, 1 is added to the first value.
It can be understood that, in the embodiment of the present application, the performance of memory management can be greatly improved no matter whether the mechanism is a mechanism that performs configuration of a memory container on a function module in advance, or a mechanism that performs memory allocation on a function module by using a one-to-one memory manager, or a mechanism that performs memory allocation based on the granularity of a memory container with a preset memory length. For example, a traditional memory allocation mechanism needs hundreds of clock cycles, whereas the memory management method provided in the embodiment of the present application can be completed only by a few clock cycles.
Further, in an embodiment of the present application, a method for memory management of a communication device may include the following steps:
step 501, determining a memory container to which a currently released memory block belongs.
In an embodiment of the present application, the memory manager may first determine a memory container to which a currently released memory chunk belongs.
Specifically, in the embodiment of the present application, since the memory containers can be stored continuously in the system memory according to a fixed size, it is possible to calculate which memory container the address belongs to according to any address in the memory container space. Further, the memory manager instance may calculate, according to the currently released memory address, which memory container the corresponding currently released memory block belongs to.
Step 502, updating a second counter of the memory container to which the currently released memory block belongs.
In an embodiment of the present application, after determining the memory container to which the currently released memory chunk belongs, the memory manager may update a second value of a second counter of the memory container to which the memory chunk belongs.
Further, in the embodiments of the present application, for each memory container, the memory manager instance may maintain a second counter for determining the number of released memory chunks corresponding to the memory container. Wherein, the identification information free _ counter can be used to indicate how many memory blocks that have been released by the application are returned to one memory container.
For example, in the embodiment of the present application, when one memory block corresponding to a memory container is released, 1 is added to the second value.
In step 503, if the first and second numerical values of the memory container to which the currently released memory block belongs are the same, the memory container is recycled, or the memory container is released.
In the embodiment of the present application, if the first numerical value and the second numerical value of the memory container to which the currently released memory block belongs are the same, the memory manager may regard that all the memory blocks allocated from the memory container have been released, and therefore, the memory manager may select to recycle the memory container, or may select to release the memory container back to the memory container pool of the communication device.
In the embodiment of the present application, after determining a memory container corresponding to a currently released memory block, a memory manager may obtain descriptors, namely an allocated _ counter (a first value) and a speed _ counter (a second value), of the memory container, and add 1 to the speed _ counter; the sizes of the allocated _ counter and the speed _ counter are then compared, and if the descriptor allocated _ counter of the memory container is equal to the speed _ counter, then it may be determined that the memory container may be recycled or returned to the system memory container pool.
For high speed data communication, the communication device continuously receives data packets, and continuously allocates memory, continuously processes, and finally continuously releases. Therefore, except for a few special data packets, it can be considered that most of the packet data in the system and the packet data before and after the packet data have an association in memory space. That is, when a batch of memory block addresses needs to be released, there is a high probability that these memory addresses are allocated consecutively from the same memory container or several adjacent memory containers.
Accordingly, in the embodiment of the present application, when a single memory block is released according to the characteristics of the data stream, a sweet _ counter (second counter) in the memory container descriptor to which the memory block belongs may be selected not to be updated immediately. Instead, one context of the memory container is maintained locally (e.g., the third counter described above), the read _ counter is updated locally only, and then processing continues with the next chunk to be released. Since it is highly likely that the next memory block to be released will still be in the same memory container, only the read _ counter in the same context needs to be incremented by 1.
It should be noted that, in the embodiment of the present application, if the currently released memory chunk and the previously released memory chunk do not belong to the same memory container, a context (such as the fourth counter described above) needs to be newly allocated locally, the free _ counter is set to 1 using the new context, and then the processing of the next memory chunk to be released continues.
Further, in the embodiment of the present application, when the number of the locally maintained memory container contexts is greater than or equal to a set threshold (a number threshold corresponding to the memory container), the second counter corresponding to the memory container may be updated by using information of all the local memory release records.
It should be noted that, in the embodiment of the present application, the memory manager may add the free _ counter (the third value described above) of the memory container in the local context to the actual free _ counter (the second value described above) of the memory container, so as to obtain the merged free _ counter. Accordingly, if the merged free _ counter is equal to the allocated _ counter (as the first value), it indicates that the memory container is no longer used, and it may be determined that the function module can cycle through the memory container or release the memory container back to the system memory container pool.
Therefore, in the embodiment of the application, the operation on the counter in the memory container during the memory release can be greatly reduced by the mode of the counter maintained locally, so that the time for releasing the memory by the functional module can be greatly reduced, the memory bandwidth can be saved, and the memory access power consumption can be reduced.
It can be understood that, in the embodiment of the present application, the size of the memory container may be selected for memory release, and even if the memory container is operated for a long time, the problem of memory fragmentation is not generated.
It is understood that the hardware acceleration used in the conventional 2G and 3G is much less than that used in the 4G and 5G, and is mostly implemented in software except for encryption and decryption and integrity protection. The allocation flow and the release flow of the memory management method provided by the embodiment of the application are general to hardware or software mechanisms, that is, the allocation flow and the release flow can be realized by software and have the same mechanism as a hardware variable-length memory manager. The hardware mechanism and the software mechanism share a pool of system containers.
Specifically, in order to realize backward compatibility, old software codes can be migrated to a novel memory management mechanism by replacing the malloc ()/free () functions in the original codes. The method realizes lower distribution time delay and smaller memory requirement and avoids memory fragments compared with the traditional memory management scheme.
The embodiment of the application provides a memory management method, a hardware memory management mechanism of a functional module can be realized through one-to-one corresponding memory manager arranged in the functional module, and the performance requirements on a CPU and a microprocessor are reduced; meanwhile, the memory manager can distribute and release the memory by taking the memory container as a unit, so that the memory power consumption is reduced, and the memory management efficiency and performance are improved. Therefore, the memory management method provided by the application realizes a hardware mechanism of memory management, and further can meet new requirements of the mobile communication device in the aspects of performance, cost, expandability and the like.
Based on the foregoing embodiments, in another embodiment of the present application, based on the foregoing fig. 2 and fig. 7 are schematic structural diagrams of a memory management device, and as shown in fig. 7, a memory management device 20 according to an embodiment of the present application may include an allocation unit 21, N management units 22, and N write units 23, where N is an integer greater than 1,
the allocation unit 21 is configured to allocate memory containers to the N functional modules respectively;
the N management units 22 are configured to allocate memory blocks to the N function modules from memory containers corresponding to the N function modules according to the memory allocation request;
the N writing units 23 are configured to write data into the memory block.
In an embodiment of the present application, further, fig. 8 is a schematic diagram illustrating a second composition structure of a memory management system, as shown in fig. 8, the memory management system 10 according to the embodiment of the present application may further include a storage 14 storing executable instructions of the processor 11, and further, the memory management system 10 may further include a communication interface 15 and a bus 16 for connecting the processor 11, the storage 14 and the communication interface 15.
In an embodiment of the present Application, the Processor 11 may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a ProgRAMmable Logic Device (PLD), a Field ProgRAMmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic devices for implementing the above processor functions may be other devices, and the embodiments of the present application are not limited in particular. The memory management system 10 may also include a memory 14, the memory 14 may be coupled to the processor 11, wherein the memory 14 is configured to store executable program code comprising computer operating instructions, and the memory 14 may comprise a high speed RAM memory and may also include a non-volatile memory, such as at least two disk memories.
In the embodiment of the present application, the bus 16 is used to connect the communication interface 15, the processor 11, and the memory 14 and the intercommunication among these devices.
In an embodiment of the present application, the memory 14 is used for storing instructions and data.
In practical applications, the Memory 14 may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (Hard Disk Drive, HDD) or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the processor 11.
In addition, each functional module in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module.
Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiment of the application provides a memory management device and a memory management system, a hardware memory management mechanism of a functional module can be realized through one-to-one corresponding memory manager arranged in the functional module, and the performance requirements on a CPU and a microprocessor are reduced; meanwhile, the memory manager can distribute and release the memory by taking the memory container as a unit, so that the memory power consumption is reduced, and the memory management efficiency and performance are improved. Therefore, the memory management method provided by the application realizes a hardware mechanism of memory management, and further can meet new requirements of the mobile communication device in the aspects of performance, cost, expandability and the like.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of implementations of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks in the flowchart and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (15)

1. A memory management system is characterized by comprising a processor, N memory managers and N functional modules, wherein the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence mode, and N is an integer greater than 1;
the processor is used for respectively allocating memory containers for the N functional modules;
the first memory manager is used for allocating memory blocks for the first functional module from a first memory container corresponding to the first functional module according to a memory allocation request of the first functional module; the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules;
the first functional module is configured to write data into the memory block.
2. The memory management system according to claim 1,
the first memory manager is specifically configured to determine, according to the memory allocation request of the first functional module, a size of a memory block required by the first functional module; and allocating memory blocks for the first functional module from the first memory container according to the size of the memory blocks required by the first functional module.
3. The memory management system according to claim 2,
the first memory manager is further configured to send an allocation request to the processor when the available storage space of the first memory container is smaller than the size of the memory block required by the first functional module;
the processor is further configured to allocate a new first memory container to the first functional module after receiving the allocation request.
4. The memory management system according to claim 1,
the first memory manager is further configured to record the number of memory chunks allocated from the first memory container, and/or the number of memory chunks released by the first memory container.
5. The memory management system according to claim 4,
the first functional module is further configured to send an update instruction to the first memory manager when the number of memory blocks continuously released in the first memory container reaches a number threshold;
the first memory manager is specifically configured to update, according to the update indication, the number of memory blocks released by the first memory container.
6. The memory management system according to claim 4 or 5,
the first memory manager is further configured to, if the number of memory blocks allocated from the first memory container is the same as the number of memory blocks already released by the first memory container, cyclically use the first memory container, or release the first memory container.
7. The memory management system according to claim 6,
the first memory manager is specifically configured to release the first memory container to a memory container pool;
the processor is specifically configured to allocate different memory containers to different functional modules from the memory container pool.
8. A memory management method is applied to a memory management system, the memory management system comprises a processor, N memory managers and N functional modules, the N memory managers and the N functional modules are respectively connected in a one-to-one correspondence mode, N is an integer greater than 1, and the method comprises the following steps:
the processor allocates memory containers for the N functional modules respectively;
a first memory manager allocates a memory block for a first functional module from a first memory container corresponding to the first functional module according to a memory allocation request of the first functional module; the first memory manager is any one memory container in the N memory managers, and the first functional module is one functional module corresponding to the first memory container in the N functional modules;
and the first functional module writes data into the memory block.
9. The method according to claim 8, wherein allocating, by a first memory manager, a memory block for a first functional module from a first memory container corresponding to the first functional module according to a memory allocation request of the first functional module, comprises:
the first memory manager determines the size of a memory block required by the first functional module according to the memory allocation request of the first functional module;
and the first memory manager allocates memory blocks for the first functional module from the first memory container according to the size of the memory blocks required by the first functional module.
10. The method of claim 9, further comprising:
when the available storage space of the first memory container is smaller than the size of the memory block required by the first functional module, the first memory manager sends an allocation request to the processor;
after receiving the allocation request, the processor allocates a new first memory container to the first functional module.
11. The method of claim 8, further comprising:
the first memory manager records the number of memory chunks allocated from the first memory container, and/or the number of memory chunks released by the first memory container.
12. The method of claim 11, further comprising:
when the number of the memory blocks continuously released in the first memory container reaches a number threshold, the first functional module sends an update instruction to the first memory manager;
and the first memory container updates the number of the memory blocks released by the first memory container according to the updating indication.
13. The method according to claim 11 or 12, characterized in that the method further comprises:
if the number of the memory blocks allocated from the first memory container is the same as the number of the memory blocks released by the first memory container, the first memory manager recycles the first memory container; or, releasing the first memory container.
14. The method of claim 13,
the first memory manager releases the first memory container to a memory container pool;
the processor allocates different memory containers from the memory container pool to different functional modules.
15. A memory management device, the memory management device comprising: a distribution unit, N management units and N writing units, wherein N is an integer greater than 1,
the allocation unit is used for allocating memory containers to the N functional modules respectively;
the N management units are configured to allocate memory blocks to the N function modules from memory containers corresponding to the N function modules according to the memory allocation request;
the N write units are configured to write data into the memory block.
CN202111091447.0A 2021-09-17 2021-09-17 Memory management system, memory management method, and memory management device Pending CN113778688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111091447.0A CN113778688A (en) 2021-09-17 2021-09-17 Memory management system, memory management method, and memory management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111091447.0A CN113778688A (en) 2021-09-17 2021-09-17 Memory management system, memory management method, and memory management device

Publications (1)

Publication Number Publication Date
CN113778688A true CN113778688A (en) 2021-12-10

Family

ID=78851669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111091447.0A Pending CN113778688A (en) 2021-09-17 2021-09-17 Memory management system, memory management method, and memory management device

Country Status (1)

Country Link
CN (1) CN113778688A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116361234A (en) * 2023-06-02 2023-06-30 深圳中安辰鸿技术有限公司 Memory management method, device and chip

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901191A (en) * 2010-05-31 2010-12-01 深圳市茁壮网络股份有限公司 Method and device for managing multiclass memories of embedded system
CN102184139A (en) * 2010-06-22 2011-09-14 上海盈方微电子有限公司 Method and system for managing hardware dynamic memory pool
CN104951370A (en) * 2015-06-02 2015-09-30 大唐移动通信设备有限公司 Memory management method and device
CN105094751A (en) * 2015-07-20 2015-11-25 中国科学院计算技术研究所 Memory management method used for parallel processing of streaming data
CN105354147A (en) * 2014-08-20 2016-02-24 腾讯科技(深圳)有限公司 Memory pool management method and management system
CN105518631A (en) * 2014-08-08 2016-04-20 华为技术有限公司 Memory management method, device and system and network-on-chip
WO2016101753A1 (en) * 2014-12-26 2016-06-30 北京奇虎科技有限公司 Method and device for uniformly processing request information
CN106354661A (en) * 2016-09-13 2017-01-25 郑州云海信息技术有限公司 Internal storage distribution method and device for storage software
CN108132889A (en) * 2017-12-20 2018-06-08 东软集团股份有限公司 EMS memory management process, device, computer readable storage medium and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901191A (en) * 2010-05-31 2010-12-01 深圳市茁壮网络股份有限公司 Method and device for managing multiclass memories of embedded system
CN102184139A (en) * 2010-06-22 2011-09-14 上海盈方微电子有限公司 Method and system for managing hardware dynamic memory pool
CN105518631A (en) * 2014-08-08 2016-04-20 华为技术有限公司 Memory management method, device and system and network-on-chip
CN105354147A (en) * 2014-08-20 2016-02-24 腾讯科技(深圳)有限公司 Memory pool management method and management system
WO2016101753A1 (en) * 2014-12-26 2016-06-30 北京奇虎科技有限公司 Method and device for uniformly processing request information
CN104951370A (en) * 2015-06-02 2015-09-30 大唐移动通信设备有限公司 Memory management method and device
CN105094751A (en) * 2015-07-20 2015-11-25 中国科学院计算技术研究所 Memory management method used for parallel processing of streaming data
CN106354661A (en) * 2016-09-13 2017-01-25 郑州云海信息技术有限公司 Internal storage distribution method and device for storage software
CN108132889A (en) * 2017-12-20 2018-06-08 东软集团股份有限公司 EMS memory management process, device, computer readable storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116361234A (en) * 2023-06-02 2023-06-30 深圳中安辰鸿技术有限公司 Memory management method, device and chip
CN116361234B (en) * 2023-06-02 2023-08-08 深圳中安辰鸿技术有限公司 Memory management method, device and chip

Similar Documents

Publication Publication Date Title
CN114115747B (en) Memory system and control method
CN110209490B (en) Memory management method and related equipment
KR102077149B1 (en) Method for managing memory and apparatus thereof
CN109144406B (en) Metadata storage method, system and storage medium in distributed storage system
CN106557427B (en) Memory management method and device for shared memory database
TW201915747A (en) Memory system and method for controlling nonvolatile memory
CN113204407B (en) Memory supermanagement method and device
US20220057966A1 (en) Memory system and method of controlling nonvolatile memory
KR20200065489A (en) Apparatus and method for daynamically allocating data paths in response to resource usage in data processing system
CN115080455A (en) Computer chip, computer board card, and storage space distribution method and device
US20170364442A1 (en) Method for accessing data visitor directory in multi-core system and device
CN113778688A (en) Memory management system, memory management method, and memory management device
CN111562883B (en) Cache management system, method and device for solid state disk
CN105469173A (en) Method of optimal management on static memory
JP6584529B2 (en) Method and apparatus for accessing a file and storage system
WO2023124423A1 (en) Storage space allocation method and apparatus, and terminal device and storage medium
US10152258B1 (en) Big block allocation of persistent main memory
CN107526691B (en) Cache management method and device
CN116048377A (en) Data processing method of solid state disk and related equipment
US10949340B2 (en) Block mapping systems and methods for storage device
US11016685B2 (en) Method and defragmentation module for defragmenting resources
CN106021121B (en) Packet processing system, method and apparatus to optimize packet buffer space
US11972110B2 (en) Storage device and storage system
CN115794417A (en) Memory management method and device
US20230236730A1 (en) Storage device and storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination