CN105302737A - Memory allocation management method and memory allocation management system - Google Patents
Memory allocation management method and memory allocation management system Download PDFInfo
- Publication number
- CN105302737A CN105302737A CN201510824722.3A CN201510824722A CN105302737A CN 105302737 A CN105302737 A CN 105302737A CN 201510824722 A CN201510824722 A CN 201510824722A CN 105302737 A CN105302737 A CN 105302737A
- Authority
- CN
- China
- Prior art keywords
- memory
- node
- memory block
- size
- chained list
- 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
Links
- 238000007726 management method Methods 0.000 title claims abstract description 25
- 238000000034 method Methods 0.000 claims abstract description 31
- 239000012141 concentrate Substances 0.000 claims 1
- 239000012634 fragment Substances 0.000 abstract description 5
- 238000013467 fragmentation Methods 0.000 description 7
- 238000006062 fragmentation reaction Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 239000011800 void material Substances 0.000 description 2
- 208000000044 Amnesia Diseases 0.000 description 1
- 208000026139 Memory disease Diseases 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000006984 memory degeneration Effects 0.000 description 1
- 208000023060 memory loss Diseases 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Landscapes
- Memory System (AREA)
Abstract
本发明公开了一种内存分配管理方法及系统,该方法包括:接收来自应用程序的携带所需内存大小的内存分配请求;在针对应用程序的内存块链表集中,查找节点内存大小与所需内存大小相适应的内存块链表;在查找到的内存块链表中,当其节点内存相较所需内存的剩余内存的大小不低于预设节点内存下限值时,将其中一内存块节点的内存中与所需内存大小相等的内存分配给应用程序,并将剩余内存归入目的内存块链表。本发明通过将剩余内存归入节点内存大小与剩余内存的大小相等目的内存块链表中实现了合理管理在内存分配过程中产生的内存碎片,有效提高了内存利用率。
The invention discloses a memory allocation management method and system. The method includes: receiving a memory allocation request from an application program carrying a required memory size; searching for the node memory size and the required memory size in the memory block linked list set for the application program A memory block linked list with a suitable size; in the found memory block linked list, when the size of the remaining memory of its node memory compared with the required memory is not lower than the lower limit of the preset node memory, one of the memory block nodes will be The memory equal to the required memory size in the memory is allocated to the application program, and the remaining memory is included in the destination memory block linked list. The present invention realizes reasonable management of memory fragments generated in the memory allocation process by classifying the remaining memory into the target memory block linked list whose size of the node memory is equal to the size of the remaining memory, and effectively improves the utilization rate of the memory.
Description
技术领域technical field
本发明涉及计算机内存管理技术领域,特别是涉及一种内存分配管理方法及系统。The invention relates to the technical field of computer memory management, in particular to a memory allocation management method and system.
背景技术Background technique
众所周知,在应用程序的运行过程中,通常需要在其需要内存的时候为其分配内存,具体地,内存分配是指在程序执行的过程中分配或者回收存储空间的分配内存的方法。常见的内存分配方法有静态内存分配和动态内存分配两种。所谓动态内存分配(DynamicMemoryAllocation)就是指在程序执行的过程中动态地分配或者回收存储空间的分配内存的方法。动态内存分配不像数组等静态内存分配方法那样需要预先分配存储空间,而是由系统根据程序的需要即时分配,且分配的大小就是程序要求的大小。As we all know, during the running process of an application program, it usually needs to allocate memory when it needs memory. Specifically, memory allocation refers to a method of allocating or reclaiming storage space during program execution. Common memory allocation methods include static memory allocation and dynamic memory allocation. The so-called dynamic memory allocation (DynamicMemoryAllocation) refers to the method of dynamically allocating or reclaiming storage space in the process of program execution. Dynamic memory allocation does not need to pre-allocate storage space like static memory allocation methods such as arrays, but is allocated by the system in real time according to the needs of the program, and the allocated size is the size required by the program.
然而,在实际应用中,对于上述两种内存分配方式,当内存分配管理系统在应用程序运行过程中要频繁的申请和释放内存,现有技术通过系统调用来分配和释放内存的方式容易出现内存碎片,进而导致内存利用率低,如果长期运行会导致系统不稳定,并且运行时间越长,系统越容易出现问题,甚至会越来越慢。However, in practical applications, for the above two memory allocation methods, when the memory allocation management system frequently applies for and releases memory during the running of the application program, the prior art method of allocating and releasing memory through system calls is prone to memory loss. Fragmentation, which in turn leads to low memory utilization. If it runs for a long time, it will lead to system instability, and the longer the running time, the more prone to problems the system will have, and even slower and slower.
发明内容Contents of the invention
有鉴于此,本发明提供了一种内存分配管理方法及系统,以合理管理内存分配过程中产生的内存碎片,进而提高内存利用率。In view of this, the present invention provides a memory allocation management method and system to reasonably manage memory fragments generated during the memory allocation process, thereby improving memory utilization.
为解决上述技术问题,本发明提供一种内存分配管理方法,包括:In order to solve the above technical problems, the present invention provides a memory allocation management method, comprising:
接收来自应用程序的携带所需内存大小的内存分配请求;Receive a memory allocation request with the required memory size from the application;
在针对所述应用程序的内存块链表集中,查找节点内存大小与所述所需内存大小相适应的内存块链表;In the memory block linked list set for the application program, search for a memory block linked list whose node memory size is compatible with the required memory size;
其中,与所述所需内存大小相适应的节点内存大小大于所述所需内存大小且与所述所需内存大小差值最小;所述内存块链表集包括至少一个内存块链表,所述内存块链表包括至少一个内存块节点且所述至少一个内存块节点中各内存块节点的节点内存大小相等;Wherein, the node memory size adapted to the required memory size is larger than the required memory size and has the smallest difference with the required memory size; the memory block linked list set includes at least one memory block linked list, the memory block The block linked list includes at least one memory block node and the node memory sizes of each memory block node in the at least one memory block node are equal;
在查找到的内存块链表中,当其节点内存相较所需内存的剩余内存的大小不低于预设节点内存下限值时,将其中一内存块节点的内存中与所述所需内存大小相等的内存分配给所述应用程序,并将所述剩余内存归入目的内存块链表;In the found memory block linked list, when the size of the remaining memory of its node memory compared with the required memory is not lower than the preset node memory lower limit value, combine the memory of one of the memory block nodes with the required memory memory of equal size is allocated to the application program, and the remaining memory is classified into the destination memory block linked list;
其中,所述目的内存块链表的节点内存大小与所述剩余内存的大小相等。Wherein, the node memory size of the destination memory block linked list is equal to the size of the remaining memory.
上述方法中,优选的,在所述将其中一内存块节点的内存中与所述所需内存大小相等的内存分配给所述应用程序,并将所述剩余内存归入目的内存块链表之后,还包括:In the above method, preferably, after allocating the memory equal to the required memory size in one of the memory block nodes to the application program, and putting the remaining memory into the destination memory block linked list, Also includes:
当检测到所述应用程序的释放内存时,将所述释放内存归入节点内存大小与其相等的内存块链表。When the released memory of the application program is detected, the released memory is put into a linked list of memory blocks whose size is equal to that of the node memory.
上述方法中,优选的,在所述查找节点内存大小与所述所需内存大小相适应的内存块链表之后,还包括:In the above method, preferably, after the memory block linked list whose memory size of the search node is adapted to the required memory size, further includes:
在所述查找到的内存块链表中,当其节点内存相较所述所需内存的剩余内存的大小低于所述节点内存下限值时,将其中一内存块节点的内存都分配给所述应用程序。In the found memory block linked list, when the size of the remaining memory of its node memory compared with the required memory is lower than the lower limit of the node memory, the memory of one of the memory block nodes is allocated to all described application.
上述方法中,优选的,所述内存块链表中各内存块节点按其内存地址线性排序,且各所述内存块节点之间的内存地址离散;In the above method, preferably, the memory block nodes in the memory block linked list are sorted linearly according to their memory addresses, and the memory addresses among the memory block nodes are discrete;
在将所述剩余内存归入所述目的内存块链表之后,当所述剩余内存的内存地址与所述目的内存块链表中某个内存块节点的内存地址连续时,还包括:After the remaining memory is classified into the target memory block linked list, when the memory address of the remaining memory is continuous with the memory address of a certain memory block node in the target memory block linked list, it also includes:
合并所述剩余内存和与其内存地址连续的内存块节点;Merge the remaining memory and memory block nodes whose memory addresses are continuous;
将合并得到的内存块节点归入节点内存大小与之内存大小相等的内存块链表。Put the merged memory block nodes into the memory block linked list whose memory size is equal to its memory size.
上述方法中,优选的,所述查找节点内存大小与所述所需内存大小相适应的内存块链表,包括:In the above method, preferably, the memory block linked list whose memory size of the search node is adapted to the required memory size includes:
在表头链表中,查找所述节点内存大小与所述所需内存大小相适应的内存块链表标识;其中,所述表头链表包括所述内存块链表标识和与所述内存块链表标识相对应的内存块链表的节点内存大小;In the header linked list, search for the memory block linked list identifier whose memory size of the node is suitable for the required memory size; wherein, the header linked list includes the memory block linked list identifier and the memory block linked list identifier corresponding to the memory block linked list identifier The node memory size of the corresponding memory block linked list;
将查找到的内存块链表标识,确定所述节点内存大小与所述所需内存大小相适应的内存块链表。Identify the found memory block linked list, and determine the memory block linked list whose size of the node memory is suitable for the required memory size.
本发明还提供了一种内存分配管理系统,包括:The present invention also provides a memory allocation management system, comprising:
接收单元,用于接收来自应用程序的携带所需内存大小的内存分配请求;a receiving unit, configured to receive a memory allocation request carrying a required memory size from an application;
查找单元,用于在针对所述应用程序的内存块链表集中,查找节点内存大小与所述所需内存大小相适应的内存块链表;A search unit, configured to search for a memory block chain list whose node memory size is compatible with the required memory size in the memory block chain list set for the application program;
其中,与所述所需内存大小相适应的节点内存大小大于所述所需内存大小且与所述所需内存大小差值最小;所述内存块链表集包括至少一个内存块链表,所述内存块链表包括至少一个内存块节点且所述至少一个内存块节点中各内存块节点的节点内存大小相等;Wherein, the node memory size adapted to the required memory size is larger than the required memory size and has the smallest difference with the required memory size; the memory block linked list set includes at least one memory block linked list, the memory block The block linked list includes at least one memory block node and the node memory sizes of each memory block node in the at least one memory block node are equal;
分配单元,用于在查找到的内存块链表中,当其节点内存相较所需内存的剩余内存的大小不低于预设节点内存下限值时,将其中一内存块节点的内存中与所述所需内存大小相等的内存分配给所述应用程序,并将所述剩余内存归入目的内存块链表;The allocation unit is used to combine the memory of one of the memory block nodes with Allocating memory with the same size as the required memory to the application program, and putting the remaining memory into the destination memory block linked list;
其中,所述目的内存块链表的节点内存大小与所述剩余内存的大小相等。Wherein, the node memory size of the destination memory block linked list is equal to the size of the remaining memory.
上述系统中,优选的,还包括:In the above system, preferably, it also includes:
归入单元,用于在所述将其中一内存块节点的内存中与所述所需内存大小相等的内存分配给所述应用程序,并将所述剩余内存归入目的内存块链表之后,当检测到所述应用程序的释放内存时,将所述释放内存归入节点内存大小与其相等的内存块链表。Incorporating into a unit, after allocating memory equal to the size of the required memory in the memory of one of the memory block nodes to the application program, and classifying the remaining memory into the destination memory block linked list, when When the released memory of the application program is detected, the released memory is put into a linked list of memory blocks whose size is equal to that of the node memory.
上述系统中,优选的,所述分配单元还用于:In the above system, preferably, the distribution unit is also used for:
在所述查找节点内存大小与所述所需内存大小相适应的内存块链表之后,在所述查找到的内存块链表中,当其节点内存相较所述所需内存的剩余内存的大小低于所述节点内存下限值时,将其中一内存块节点的内存都分配给所述应用程序。After the search for the memory block linked list whose node memory size is suitable for the required memory size, in the found memory block linked list, when its node memory is lower than the size of the remaining memory of the required memory When the lower limit of the node memory is reached, all the memory of one of the memory block nodes is allocated to the application program.
上述系统中,优选的,所述内存块链表中各内存块节点按其内存地址线性排序,且各所述内存块节点之间的内存地址离散;In the above system, preferably, the memory block nodes in the memory block linked list are sorted linearly according to their memory addresses, and the memory addresses among the memory block nodes are discrete;
该系统还包括:The system also includes:
合并单元,用于在将所述剩余内存归入所述目的内存块链表之后,当所述剩余内存的内存地址与所述目的内存块链表中某个内存块节点的内存地址连续时,合并所述剩余内存和与其内存地址连续的内存块节点;A merging unit for merging the remaining memory into the destination memory block linked list, when the memory address of the remaining memory is continuous with the memory address of a certain memory block node in the destination memory block linked list Describe the remaining memory and memory block nodes continuous with its memory address;
以及所述归入单元还用于将合并得到的内存块节点归入节点内存大小与之内存大小相等的内存块链表。And the categorization unit is further used to categorize the merged memory block nodes into the memory block linked list whose memory size is equal to that of the node.
上述系统中,优选的,所述查找单元包括:In the above system, preferably, the search unit includes:
查找子单元,用于在表头链表中,查找所述节点内存大小与所述所需内存大小相适应的内存块链表标识;其中,所述表头链表包括所述内存块链表标识和与所述内存块链表标识相对应的内存块链表的节点内存大小;The search subunit is used to search for the memory block linked list identifier whose memory size of the node is compatible with the required memory size in the header linked list; wherein, the header linked list includes the memory block linked list identifier and the ID of the memory block linked list The node memory size of the memory block linked list corresponding to the memory block linked list identifier;
确定子单元,用于将查找到的内存块链表标识,确定所述节点内存大小与所述所需内存大小相适应的内存块链表。The determination subunit is used to identify the found memory block linked list, and determine the memory block linked list whose memory size of the node is suitable for the required memory size.
以上本发明提供的一种内存分配管理方法及系统中,在应用程序初始申请内存时,为其分配一块足够大的大小为N内存并利用这块内存建立一内存块链表,后续会由于应用程序的频繁申请释放内存,形成很多大小小于N的内存块组成的链表,以上所有链表形成内存块链表集,该内存块链表集包括至少一个内存块链表,并且每个内存块链表包括至少一个内存块节点且各内存块节点的节点内存大小相等。基于此,当接收到上述应用程序的内存分配请求时,首先,在针对该应用程序的内存块链表集中,查找节点内存大小与所需内存大小相适应的内存块链表;本发明主要针对与所需内存大小相适应的节点内存大小大于所需内存大小且与所需内存大小差值最小的情况(会产生内存碎片的情况)。其次,将查找到的内存块链表中一内存块节点的内存中与所需内存大小相等的内存分配给应用程序,并将剩余内存归入节点内存大小与剩余内存的大小相等目的内存块链表。由此可见,本发明通过将剩余内存归入节点内存大小与剩余内存的大小相等目的内存块链表中实现了合理管理在内存分配过程中产生的内存碎片,有效提高了内存利用率。In the above memory allocation management method and system provided by the present invention, when the application program initially applies for memory, it allocates a large enough memory with a size of N and uses this memory to build a memory block list. The frequent applications to release memory form a linked list composed of many memory blocks with a size smaller than N. All the above linked lists form a memory block linked list set. The memory block linked list set includes at least one memory block linked list, and each memory block linked list includes at least one memory block. node and the node memory size of each memory block node is equal. Based on this, when the memory allocation request of the above-mentioned application program is received, at first, in the memory block linked list set for the application program, the memory block linked list whose size of the node memory is suitable for the required memory size is searched; The case where the memory size of the node that needs to be compatible with the memory size is larger than the required memory size and has the smallest difference with the required memory size (memory fragmentation will occur). Secondly, allocate memory equal to the required memory size in the memory of a memory block node in the found memory block linked list to the application program, and classify the remaining memory into the destination memory block linked list whose size of the node memory is equal to the size of the remaining memory. It can be seen that the present invention realizes reasonable management of memory fragments generated in the memory allocation process by classifying the remaining memory into the target memory block linked list whose size of the node memory is equal to the size of the remaining memory, and effectively improves the memory utilization rate.
同时,本发明中是在当查找到的内存块链表的节点内存相较所需内存的剩余内存的大小不低于预设节点内存下限值时,将查找到的内存块链表中一内存块节点的内存中与所述所需内存大小相等的内存分配给所述应用程序。通过合理定义内存块链表的节点内存下限值,能够避免剩余内存频繁的归入操作,进一步合理管理内存碎片,进而提高内存利用率。At the same time, in the present invention, when the size of the remaining memory of the node memory of the found memory block linked list is not lower than the preset node memory lower limit value compared with the required memory, a memory block in the found memory block linked list is A memory equal to the required memory size in the memory of the node is allocated to the application program. By reasonably defining the lower limit of the node memory of the memory block linked list, it is possible to avoid frequent operations of residing the remaining memory, further reasonably manage memory fragmentation, and improve memory utilization.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.
图1为本发明实施例提供的一种内存分配管理方法的流程图;FIG. 1 is a flowchart of a memory allocation management method provided by an embodiment of the present invention;
图2为本发明实施例提供的基于图1的一种实际应用总体流程图;Fig. 2 is an overall flowchart of a practical application based on Fig. 1 provided by the embodiment of the present invention;
图3为本发明实施例提供的一种内存分配管理结构图;FIG. 3 is a memory allocation management structure diagram provided by an embodiment of the present invention;
图4为本发明实施例提供的一种内存分配管理系统的结构框图示意图。FIG. 4 is a schematic structural block diagram of a memory allocation management system provided by an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明的核心是提供一种内存分配管理方法及系统,以合理管理内存分配过程中产生的内存碎片,进而提高内存利用率。The core of the present invention is to provide a memory allocation management method and system to reasonably manage memory fragments generated in the process of memory allocation, thereby improving memory utilization.
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
参考图1,图1示出了本发明实施例提供的一种内存分配管理方法的流程图,该方法具体可以包括如下步骤:Referring to FIG. 1, FIG. 1 shows a flow chart of a memory allocation management method provided by an embodiment of the present invention. The method may specifically include the following steps:
步骤S100、接收来自应用程序的携带所需内存大小的内存分配请求。Step S100, receiving a memory allocation request carrying a required memory size from an application program.
在应用程序初始申请内存时,根据实际需求,先为其分配一块足够大的内存,该内存块大小为N(2的整数次方),然后利用这块内存建立一内存块链表,后续会由于应用程序的频繁申请释放内存,形成很多大小小于N的内存块组成的链表,以上所有链表形成内存块链表集,可以理解的是该内存块链表集包括至少一个内存块链表,并且在本发明中,每个内存块链表包括至少一个内存块节点且各内存块节点的节点内存大小相等。When the application program initially applies for memory, according to the actual needs, first allocate a large enough memory for it, the size of the memory block is N (integer power of 2), and then use this memory to build a memory block linked list. The frequent application of the application to release the memory forms a linked list composed of many memory blocks with a size smaller than N. All the above linked lists form a memory block linked list set. It can be understood that the memory block linked list set includes at least one memory block linked list, and in the present invention , each memory block linked list includes at least one memory block node, and the node memory sizes of each memory block node are equal.
在实际应用中,如果在初始分配内存时失败,则向应用程序反馈相应的提示信息。当此内存块用尽的时候再分配一块同样大小的内存块,并用链表的方式将新分配的内存块连接起来。当检测到应用程序退出时,统一释放所申请的内存块。In practical applications, if the initial allocation of memory fails, the corresponding prompt information will be fed back to the application. When this memory block is used up, allocate a memory block of the same size, and connect the newly allocated memory blocks in the form of a linked list. When it is detected that the application exits, the allocated memory block is released uniformly.
对于每一内存块链表而言,其中各内存块节点按其内存地址线性排序,且各内存块节点之间的内存地址离散。当相邻两个节点的内存地址连续时,将两者合并,并归入到对应大小的内存块链表中。本发明中,内存块链表的大小表示其中内存块节点对应的内存大小。For each memory block linked list, the memory block nodes are sorted linearly according to their memory addresses, and the memory addresses among the memory block nodes are discrete. When the memory addresses of two adjacent nodes are continuous, the two are merged and put into the linked list of memory blocks of the corresponding size. In the present invention, the size of the memory block linked list represents the memory size corresponding to the memory block nodes.
步骤S101、在针对应用程序的内存块链表集中,查找节点内存大小与所需内存大小相适应的内存块链表。Step S101 , in the memory block linked list set for the application program, search for a memory block linked list whose size of the node memory is compatible with the required memory size.
可以理解的是,与所需内存大小相适应的节点内存大小等于所需内存大小时,直接将查找到的内存块链表中首节点的内存分配给应用程序;实际上,本发明主要针对的是会产生内存碎片的情况,即与所需内存大小相适应的节点内存大小大于所需内存大小,且在所有大于该所需内存大小的节点内存大小中其与所需内存大小差值最小的情况。另外,若所需内存大小小于2的整数倍,则按与其最接近的2的整数倍来分配内存。It can be understood that when the size of the node memory adapted to the required memory size is equal to the required memory size, the memory of the first node in the found memory block linked list is directly allocated to the application program; in fact, the present invention is mainly aimed at There will be memory fragmentation, that is, the node memory size suitable for the required memory size is larger than the required memory size, and the difference between the required memory size and the required memory size is the smallest among all node memory sizes larger than the required memory size . In addition, if the required memory size is less than an integer multiple of 2, the memory is allocated according to the closest integer multiple of 2.
为了在遍历寻找合适的内存块链表时减少查找时间,进而提高查找效率,本发明在此引入表头链表,具体地,将内存块链表集中所有链表的表头按内存大小顺序链接起来得到表头链表,该表头链表包括内存块链表标识和与内存块链表标识相对应的内存块链表的节点内存大小。基于此,上述查找节点内存大小与所需内存大小相适应的内存块链表的具体过程如下:In order to reduce the search time when traversing to find a suitable memory block linked list, and then improve the search efficiency, the present invention introduces the header linked list here, specifically, the headers of all the linked lists in the memory block linked list are linked in order according to the memory size to obtain the header A linked list, the header linked list includes a memory block linked list identifier and a node memory size of the memory block linked list corresponding to the memory block linked list identifier. Based on this, the above specific process of finding the memory block linked list whose node memory size is compatible with the required memory size is as follows:
首先,在表头链表中,查找节点内存大小与所需内存大小相适应的内存块链表标识;其次,将查找到的内存块链表标识,确定节点内存大小与所需内存大小相适应的内存块链表。Firstly, in the header linked list, find the memory block linked list identification whose node memory size is compatible with the required memory size; secondly, find the memory block linked list identification to determine the memory block whose node memory size is suitable for the required memory size linked list.
步骤S102、在查找到的内存块链表中,判断其节点内存相较所需内存的剩余内存的大小是否低于预设节点内存下限值,如果是,则进入步骤S103,否则,进入步骤S104。Step S102, in the searched memory block linked list, judge whether the size of the remaining memory of the node memory compared with the required memory is lower than the preset lower limit of the node memory, if yes, go to step S103, otherwise, go to step S104 .
步骤S103、将查找到的内存块链表中一内存块节点的内存都分配给应用程序。Step S103, allocating the memory of a memory block node in the found memory block linked list to the application program.
具体地,分配给用户内存的时候需将内存块链表中相应节点返回给用户,内存管理系统就不必关心已分配的内存块,当检测到应用程序要求释放内存时,直接操作该内存块链表节点就可以。Specifically, when allocating memory to the user, it is necessary to return the corresponding node in the memory block list to the user, and the memory management system does not need to care about the allocated memory block. When it detects that the application program requires release of memory, it directly operates the node of the memory block list can.
步骤S104、将查找到的内存块链表中一内存块节点的内存中与所需内存大小相等的内存分配给应用程序,并将剩余内存归入目的内存块链表。Step S104. Allocate the memory equal to the required memory size in the memory of a memory block node in the found memory block linked list to the application program, and put the remaining memory into the destination memory block linked list.
其中,目的内存块链表的节点内存大小与剩余内存的大小相等。Wherein, the node memory size of the destination memory block linked list is equal to the size of the remaining memory.
在实际应用中,若未找到相应的内存块链表,则创建新的内存块链表并将剩余内存加入,然后将此内存块链表按大小插入到表头链表。在将剩余内存归入目的内存块链表之后,当剩余内存的内存地址与目的内存块链表中某个内存块节点的内存地址连续时,为保证每一内存块链表中各内存块节点(对应的内存块)的内存地址离散,还需要合并剩余内存和与其内存地址连续的内存块节点(对应的内存块);然后将合并得到的内存块节点归入节点内存大小与之内存大小相等的内存块链表。In practical applications, if the corresponding memory block linked list is not found, create a new memory block linked list and add the remaining memory, and then insert the memory block linked list into the header linked list according to the size. After the remaining memory is classified into the destination memory block linked list, when the memory address of the remaining memory is continuous with the memory address of a certain memory block node in the destination memory block linked list, in order to ensure that each memory block node in each memory block linked list (corresponding The memory address of the memory block) is discrete, and it is necessary to merge the remaining memory and the memory block nodes (corresponding memory blocks) that are continuous with its memory address; linked list.
同剩余内存的归入一样,若未找到相应的内存块链表,则创建新的内存块链表并将此内存块节点插入,然后将此内存块链表按大小插入到表头链表。实际上,只要有新的内存块节点加入对应的内存块链表中,如果出现内存地址连续的情况,都需要执行上述节点合并操作;根据上述内容可以理解的是,这里的新的内存块节点可以为剩余内存或者先前合并得到的内存块节点。在实际应用中,当需要的时候,上述合并过程是迭代的,直到内存块链表中各内存块节点的内存地址离散。可以理解的是,上述提及的将内存块链表按照线性地址进行排序,有利于提升在内存块节点合并时候的效率。Same as the classification of the remaining memory, if the corresponding memory block linked list is not found, create a new memory block linked list and insert this memory block node, and then insert this memory block linked list into the header linked list according to the size. In fact, as long as a new memory block node is added to the corresponding memory block linked list, if there is a continuous memory address, the above node merging operation needs to be performed; it can be understood from the above that the new memory block node here can be It is the node of the remaining memory or the previously merged memory block. In practical applications, when necessary, the above merging process is iterative until the memory addresses of each memory block node in the memory block linked list are discrete. It can be understood that the above-mentioned sorting of the memory block linked list according to the linear address is beneficial to improve the efficiency when the memory block nodes are merged.
无论是步骤S103,还是步骤S104,首先,为了保证内存块列表的有序性,上述查找到的内存块链表中一内存块节点优选地为首节点;其次,在将内存分配给应用程序之后,由于应用程序释放内存时同样会产生内存碎片,此时,为了进一步合理管理内存碎片,还需要将释放内存归入相应的内存块链表,具体地:当检测到应用程序的释放内存时,将释放内存归入节点内存大小与其相等的内存块链表;最后,在将内存分配给应用程序之后,将参与分配的内存块节点(即首节点)从其所属的内存块链表中删除,后续节点补充上来。若删除后此内存块链表为空,则将此内存块链表的表头从表头链表中删除。Whether it is step S103 or step S104, first, in order to ensure the order of the memory block list, a memory block node in the memory block linked list found above is preferably the head node; secondly, after the memory is allocated to the application program, due to Memory fragmentation will also occur when the application releases memory. At this time, in order to further reasonably manage memory fragmentation, it is necessary to include the released memory into the corresponding memory block linked list. Specifically: when the release of memory by the application is detected, the memory will be released Include the memory block list whose memory size is equal to that of the node; finally, after allocating the memory to the application program, the memory block node participating in the allocation (that is, the first node) is deleted from the memory block list to which it belongs, and subsequent nodes are added. If the memory block linked list is empty after deletion, the header of the memory block linked list is deleted from the header linked list.
对于上述技术方案在实际应用中的总体实现过程,可以参考图2示出的基于图1的一种实际应用总体流程图。其中,该流程图有利于清晰、简要地理清本发明上述技术方案在实际应用中的总体实现过程,也正是因为这样,图中文字描述内容比较简短、概括,对于具体内容可以在文中相应位置查阅。For the overall implementation process of the above technical solution in actual application, reference may be made to the overall flow chart of an actual application shown in FIG. 2 based on FIG. 1 . Among them, the flow chart is conducive to clearly and concisely clarifying the overall implementation process of the above-mentioned technical solution of the present invention in practical applications, and it is precisely because of this that the text description content in the figure is relatively short and general, and specific content can be included in the corresponding position in the text Check out.
综上,本发明基于内存块链表,通过将剩余内存归入目的内存块链表以及将释放内存归入内存块链表,实现了对在内存分配过程中产生的内存碎片的合理管理,进而有效提高了内存利用率,进而有效避免了现有技术中的以下问题:如果长期运行会导致系统不稳定,并且运行时间越长,系统越容易出现问题,甚至会越来越慢。In summary, based on the memory block linked list, the present invention realizes reasonable management of memory fragments generated in the process of memory allocation by classifying the remaining memory into the target memory block linked list and the released memory into the memory block linked list, thereby effectively improving the efficiency of memory allocation. Memory utilization, thus effectively avoiding the following problems in the prior art: long-term operation will lead to system instability, and the longer the operation time, the more prone to problems the system will have, and even slower and slower.
同时,本领域技术人员可以根据实际情况定义内存块链表的节点内存下限值,节点内存下限值对应最小内存块,这是因为如果最小内存块太小就会造成剩余内存块频繁的插入和合并操作,如果最小内存块太大的话,就会因为分配给用户的内存过于富余而造成内存利用率降低。可以理解的是,通过合理定义节点内存下限值,能够避免剩余内存频繁的归入操作,进一步合理管理内存碎片,进而提高内存利用率。At the same time, those skilled in the art can define the lower limit value of the node memory of the memory block linked list according to the actual situation, and the lower limit value of the node memory corresponds to the minimum memory block. This is because if the minimum memory block is too small, frequent insertion and For the merge operation, if the minimum memory block is too large, the memory utilization rate will decrease because the memory allocated to the user is too surplus. It is understandable that by reasonably defining the lower limit of the node memory, frequent allocation operations of remaining memory can be avoided, memory fragmentation can be further reasonably managed, and memory utilization can be improved.
基于上述本发明实施例所公开的技术方案,本实施例中,基于实际应用,可以参考以下编程代码实现上述技术方案:Based on the technical solutions disclosed in the above embodiments of the present invention, in this embodiment, based on practical applications, the following programming codes can be referred to to realize the above technical solutions:
(1)内存块链表、表头链表以及初始分配的大的内存块的数据结构如下:(1) The data structure of the memory block linked list, the header linked list and the initially allocated large memory block is as follows:
①内存块链表:①Memory block linked list:
②表头链表:② Header linked list:
③初始分配的大的内存块:③ Initially allocated large memory block:
(2)基于第(1)点中的数据结果,在分配大小为N的内存块,并初始化结构体Mempool,初始化代码如下:(2) Based on the data results in point (1), allocate a memory block of size N and initialize the structure Mempool. The initialization code is as follows:
Mempool*mempool;Mempool *mempool;
Headlist*headlist;Headlist*headlist;
Memlist*memlist;Memlist*memlist;
Void*memptr=(void*)malloc(N);void*memptr=(void*)malloc(N);
If(memptr==NULL)If(memptr==NULL)
Return0;return0;
//初始化memlist(内存块链表)//Initialize memlist (memory block linked list)
Memlist->memptr=*memptr;Memlist->memptr = *memptr;
Memlist->next=NULL;memlist->next=NULL;
//初始化headlist(表头链表)//Initialize headlist (header linked list)
Headlist->size=N;Headlist->size=N;
Headlist->num=1;headlist->num=1;
Headlist->list=memlist;Headlist->list = memlist;
Headlist->next=NULL;Headlist->next=NULL;
//初始化mempool(分配大小为N的内存块)//Initialize mempool (allocate a memory block of size N)
Mempool->size=N;Mempool->size=N;
Mempool->memptr=memptr;Mempool->memptr=memptr;
Mempool->next=NULL;Mempool->next=NULL;
Mempool->list=headlist;Mempool->list=headlist;
(3)查找合适的表头链表,找到大于或者等于要申请的内存块的内存块链表,代码如下:(3) Find the appropriate table header linked list, find the memory block linked list that is greater than or equal to the memory block to be applied for, the code is as follows:
(4)合并地址连续的内存块,代码如下:(4) Merge memory blocks with continuous addresses, the code is as follows:
(5)释放申请的内存(5) Release the requested memory
基于上述功能代码,结合实际应用场景举个例子:Based on the above function codes, combined with actual application scenarios, give an example:
参考图3示出的一种内存分配管理结构图,具体地,在应用程序初始申请内存时,根据实际需求,先为其分配一块10M的内存块,当该10M内存块用尽时,再分配一块同样为10M的内存块,这两个10M的内存块以链表形式连接起来。Referring to the memory allocation management structure diagram shown in Figure 3, specifically, when an application program initially applies for memory, it first allocates a 10M memory block according to actual needs, and when the 10M memory block is used up, it allocates A memory block that is also 10M, these two 10M memory blocks are connected in the form of a linked list.
在第一块10M的内存块的使用过程中,由于应用程序的频繁申请释放内存,形成很多大小小于10M的内存块组成的链表,比如2K、8K以及64K等等,内存大小相等的内存块节点形成相应的内存块链表,比如同为2K的内存块节点形成节点内存大小为2K的内存块链表,而不同节点内存大小的内存块链表的表头形成表头链表,表头链表中按内存块链表的节点内存大小由小至大排序。During the use of the first 10M memory block, due to the frequent application of applications to release memory, a linked list consisting of many memory blocks with a size smaller than 10M is formed, such as 2K, 8K, and 64K, etc., memory block nodes with equal memory sizes Form the corresponding memory block linked list, for example, the same 2K memory block nodes form a memory block linked list with a node memory size of 2K, and the headers of memory block linked lists with different node memory sizes form a header linked list. The node memory size of the linked list is sorted from small to large.
需要说明的是,上述具体代码和具体数值均是为了便于本领域技术人员理解本发明所提供的技术方案而举的例子,本领域技术人员可以根据实际情况进行调整,本发明并不严格局限于此。It should be noted that the above specific codes and specific values are all examples for those skilled in the art to understand the technical solution provided by the present invention, and those skilled in the art can make adjustments according to the actual situation, and the present invention is not strictly limited to this.
基于上述本发明实施例提供的内存分配管理方法,本发明实施例还提供了一种内存分配管理系统,参考图4,该系统400可以包括如下内容:Based on the above memory allocation management method provided by the embodiment of the present invention, the embodiment of the present invention also provides a memory allocation management system. Referring to FIG. 4, the system 400 may include the following content:
接收单元401,用于接收来自应用程序的携带所需内存大小的内存分配请求;The receiving unit 401 is configured to receive a memory allocation request carrying a required memory size from an application program;
查找单元402,用于在针对应用程序的内存块链表集中,查找节点内存大小与所需内存大小相适应的内存块链表;A search unit 402, configured to search for a memory block chain list whose node memory size is compatible with the required memory size in the memory block chain list set for the application;
其中,与所需内存大小相适应的节点内存大小大于所需内存大小且与所需内存大小差值最小;内存块链表集包括至少一个内存块链表,内存块链表包括至少一个内存块节点且至少一个内存块节点中各内存块节点的节点内存大小相等;Among them, the node memory size that is suitable for the required memory size is larger than the required memory size and has the smallest difference with the required memory size; the memory block linked list set includes at least one memory block linked list, and the memory block linked list includes at least one memory block node and at least The node memory size of each memory block node in a memory block node is equal;
分配单元403,用于在查找到的内存块链表中,当其节点内存相较所需内存的剩余内存的大小不低于预设节点内存下限值时,将其中一内存块节点的内存中与所需内存大小相等的内存分配给应用程序,并将剩余内存归入目的内存块链表;The allocating unit 403 is used to, in the found memory block linked list, when the size of the remaining memory of its node memory compared with the required memory is not lower than the preset node memory lower limit value, allocate one of the memory block nodes in the memory The memory equal to the required memory size is allocated to the application program, and the remaining memory is included in the destination memory block linked list;
其中,目的内存块链表的节点内存大小与剩余内存的大小相等。Wherein, the node memory size of the destination memory block linked list is equal to the size of the remaining memory.
本发明中,上述系统400还可以包括归入单元,用于在将其中一内存块节点的内存中与所需内存大小相等的内存分配给应用程序,并将剩余内存归入目的内存块链表之后,当检测到应用程序的释放内存时,将释放内存归入节点内存大小与其相等的内存块链表。In the present invention, the above-mentioned system 400 may also include a subclassing unit, which is used to allocate the memory equal to the required memory size in the memory of one of the memory block nodes to the application program, and after the remaining memory is classified into the destination memory block linked list , when the released memory of the application is detected, the released memory will be included in the linked list of memory blocks whose size is equal to that of the node memory.
本发明中,上述分配单元403还可以用于:在查找节点内存大小与所需内存大小相适应的内存块链表之后,在查找到的内存块链表中,当其节点内存相较所需内存的剩余内存的大小低于节点内存下限值时,将其中一内存块节点的内存都分配给应用程序。In the present invention, the above-mentioned allocation unit 403 can also be used for: after finding the memory block linked list whose node memory size is suitable for the required memory size, in the found memory block linked list, when the node memory is compared with the required memory size When the size of the remaining memory is lower than the lower limit of the node memory, all the memory of one of the memory block nodes is allocated to the application program.
本发明中,上述内存块链表中各内存块节点按其内存地址线性排序,且各内存块节点之间的内存地址离散;In the present invention, each memory block node in the memory block linked list is sorted linearly according to its memory address, and the memory addresses between each memory block node are discrete;
该系统400还可以包括合并单元,用于在将剩余内存归入目的内存块链表之后,当剩余内存的内存地址与目的内存块链表中某个内存块节点的内存地址连续时,合并剩余内存和与其内存地址连续的内存块节点;The system 400 may also include a merging unit, which is used to merge the remaining memory with the memory address of a memory block node in the destination memory block list when the memory address of the remaining memory is continuous with the memory address of a memory block node in the destination memory block list after the remaining memory is included in the destination memory block linked list. A memory block node whose memory address is continuous;
以及归入单元还用于将合并得到的内存块节点归入节点内存大小与之内存大小相等的内存块链表。And the categorization unit is also used for categorizing the merged memory block nodes into the memory block linked list whose memory size is equal to the memory size of the node.
本发明中,上述查找单元可以包括以下内容:In the present invention, the above-mentioned search unit may include the following content:
查找子单元,用于在表头链表中,查找节点内存大小与所需内存大小相适应的内存块链表标识;其中,表头链表包括内存块链表标识和与内存块链表标识相对应的内存块链表的节点内存大小;The search sub-unit is used to search for the memory block linked list identifier whose node memory size is compatible with the required memory size in the header linked list; wherein, the header linked list includes the memory block linked list identifier and the memory block corresponding to the memory block linked list identifier The node memory size of the linked list;
确定子单元,用于将查找到的内存块链表标识,确定节点内存大小与所需内存大小相适应的内存块链表。The determining subunit is used to identify the found memory block linked list, and determine the memory block linked list whose size of the node memory is compatible with the required memory size.
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于系统类实施例而言,由于其与方法实施例基本相似,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts in each embodiment, refer to each other, that is, Can. As for the system embodiment, because it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
以上对本发明所提供的一种内存分配管理方法及系统进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The memory allocation management method and system provided by the present invention have been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention, and the descriptions of the above embodiments are only used to help understand the method and core idea of the present invention. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510824722.3A CN105302737A (en) | 2015-11-24 | 2015-11-24 | Memory allocation management method and memory allocation management system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510824722.3A CN105302737A (en) | 2015-11-24 | 2015-11-24 | Memory allocation management method and memory allocation management system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105302737A true CN105302737A (en) | 2016-02-03 |
Family
ID=55200025
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510824722.3A Pending CN105302737A (en) | 2015-11-24 | 2015-11-24 | Memory allocation management method and memory allocation management system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105302737A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106294198A (en) * | 2016-08-05 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | The memory allocation method of a kind of (SuSE) Linux OS and method for releasing |
CN106844046A (en) * | 2016-12-31 | 2017-06-13 | 昊宏广泰(北京)科技有限公司 | Bandwidth carrier memory management algorithm |
CN108038062A (en) * | 2017-11-27 | 2018-05-15 | 北京锦鸿希电信息技术股份有限公司 | The EMS memory management process and device of embedded system |
CN108874532A (en) * | 2017-06-01 | 2018-11-23 | 北京旷视科技有限公司 | Memory allocation method and equipment |
CN108920276A (en) * | 2018-06-27 | 2018-11-30 | 郑州云海信息技术有限公司 | Linux system memory allocation method, system and equipment and storage medium |
CN109144890A (en) * | 2018-07-02 | 2019-01-04 | 珠海格力电器股份有限公司 | Data storage method and device |
CN110955496A (en) * | 2019-11-26 | 2020-04-03 | 浙江大华技术股份有限公司 | Memory processing method and device, storage medium and electronic device |
CN112269665A (en) * | 2020-12-22 | 2021-01-26 | 北京金山云网络技术有限公司 | Memory processing method and device, electronic equipment and storage medium |
CN114096953A (en) * | 2019-10-17 | 2022-02-25 | 深圳市欢太科技有限公司 | Memory management method and device, electronic equipment and computer readable medium |
CN114840338A (en) * | 2022-04-28 | 2022-08-02 | 阿里巴巴(中国)有限公司 | Non-volatile memory resource management method, computer device and storage medium |
CN116360788A (en) * | 2023-02-17 | 2023-06-30 | 深圳市亿维自动化技术有限公司 | Compiling method, compiler and electronic device for structured text programming language |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1031927A2 (en) * | 1999-02-04 | 2000-08-30 | Sun Microsystems Inc. | Protocol for coordinating the distribution of shared memory. |
CN1963788A (en) * | 2005-11-08 | 2007-05-16 | 中兴通讯股份有限公司 | A managing method for EMS memory |
CN101221536A (en) * | 2008-01-25 | 2008-07-16 | 中兴通讯股份有限公司 | Internal memory managing method and device of embedded system |
CN101382916A (en) * | 2007-09-06 | 2009-03-11 | 大唐移动通信设备有限公司 | Method for managing embedded system memory |
CN102063385A (en) * | 2010-12-23 | 2011-05-18 | 深圳市金宏威实业发展有限公司 | Memory management method and system |
CN102446139A (en) * | 2011-11-14 | 2012-05-09 | 奇智软件(北京)有限公司 | Data storage method and device |
CN102455974A (en) * | 2010-10-21 | 2012-05-16 | 上海宝信软件股份有限公司 | High-speed internal memory application and release management system with controllable internal memory consumption and high-speed internal memory application release management method |
CN103106147A (en) * | 2013-03-08 | 2013-05-15 | 中国科学院上海微系统与信息技术研究所 | Memory allocation method and system |
-
2015
- 2015-11-24 CN CN201510824722.3A patent/CN105302737A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1031927A2 (en) * | 1999-02-04 | 2000-08-30 | Sun Microsystems Inc. | Protocol for coordinating the distribution of shared memory. |
CN1963788A (en) * | 2005-11-08 | 2007-05-16 | 中兴通讯股份有限公司 | A managing method for EMS memory |
CN101382916A (en) * | 2007-09-06 | 2009-03-11 | 大唐移动通信设备有限公司 | Method for managing embedded system memory |
CN101221536A (en) * | 2008-01-25 | 2008-07-16 | 中兴通讯股份有限公司 | Internal memory managing method and device of embedded system |
CN102455974A (en) * | 2010-10-21 | 2012-05-16 | 上海宝信软件股份有限公司 | High-speed internal memory application and release management system with controllable internal memory consumption and high-speed internal memory application release management method |
CN102063385A (en) * | 2010-12-23 | 2011-05-18 | 深圳市金宏威实业发展有限公司 | Memory management method and system |
CN102446139A (en) * | 2011-11-14 | 2012-05-09 | 奇智软件(北京)有限公司 | Data storage method and device |
CN103106147A (en) * | 2013-03-08 | 2013-05-15 | 中国科学院上海微系统与信息技术研究所 | Memory allocation method and system |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106294198B (en) * | 2016-08-05 | 2018-12-07 | 浪潮(北京)电子信息产业有限公司 | A kind of memory allocation method and method for releasing of (SuSE) Linux OS |
CN106294198A (en) * | 2016-08-05 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | The memory allocation method of a kind of (SuSE) Linux OS and method for releasing |
CN106844046A (en) * | 2016-12-31 | 2017-06-13 | 昊宏广泰(北京)科技有限公司 | Bandwidth carrier memory management algorithm |
CN106844046B (en) * | 2016-12-31 | 2021-06-11 | 北京市腾河智慧能源科技有限公司 | Broadband carrier memory management method |
CN108874532B (en) * | 2017-06-01 | 2020-11-06 | 北京旷视科技有限公司 | Memory allocation method and device |
CN108874532A (en) * | 2017-06-01 | 2018-11-23 | 北京旷视科技有限公司 | Memory allocation method and equipment |
CN108038062A (en) * | 2017-11-27 | 2018-05-15 | 北京锦鸿希电信息技术股份有限公司 | The EMS memory management process and device of embedded system |
CN108920276A (en) * | 2018-06-27 | 2018-11-30 | 郑州云海信息技术有限公司 | Linux system memory allocation method, system and equipment and storage medium |
CN109144890A (en) * | 2018-07-02 | 2019-01-04 | 珠海格力电器股份有限公司 | Data storage method and device |
CN109144890B (en) * | 2018-07-02 | 2021-02-05 | 珠海格力电器股份有限公司 | Data storage method and device |
CN114096953A (en) * | 2019-10-17 | 2022-02-25 | 深圳市欢太科技有限公司 | Memory management method and device, electronic equipment and computer readable medium |
CN110955496A (en) * | 2019-11-26 | 2020-04-03 | 浙江大华技术股份有限公司 | Memory processing method and device, storage medium and electronic device |
CN112269665A (en) * | 2020-12-22 | 2021-01-26 | 北京金山云网络技术有限公司 | Memory processing method and device, electronic equipment and storage medium |
CN112269665B (en) * | 2020-12-22 | 2021-05-11 | 北京金山云网络技术有限公司 | Memory processing method and device, electronic equipment and storage medium |
CN114840338A (en) * | 2022-04-28 | 2022-08-02 | 阿里巴巴(中国)有限公司 | Non-volatile memory resource management method, computer device and storage medium |
CN116360788A (en) * | 2023-02-17 | 2023-06-30 | 深圳市亿维自动化技术有限公司 | Compiling method, compiler and electronic device for structured text programming language |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105302737A (en) | Memory allocation management method and memory allocation management system | |
CN106294190B (en) | Storage space management method and device | |
CN107092439B (en) | Method and device for data storage | |
CN102446139B (en) | Method and device for data storage | |
CN106126124B (en) | A kind of data processing method and electronic equipment | |
CN111177017B (en) | Memory allocation method and device | |
WO2019001020A1 (en) | Storage space arrangement method, apparatus, and system based on distributed system | |
CN105117351A (en) | Method and apparatus for writing data into cache | |
CN102866954B (en) | The method of Memory Allocation and device | |
CN112214159B (en) | Method and system for managing key-value solid state drives (KV SSDs) | |
US9355121B1 (en) | Segregating data and metadata in a file system | |
CN103106147B (en) | Memory allocation method and system | |
CN111443875A (en) | Data processing method, device and device based on address relation table | |
WO2021179170A1 (en) | Data pushing method and device, server, and storage medium | |
CN107533435A (en) | The distribution method and storage device of memory space | |
CN113326264A (en) | Data processing method, server and storage medium | |
CN113835639B (en) | I/O request processing method, device, equipment and readable storage medium | |
US10649967B2 (en) | Memory object pool use in a distributed index and query system | |
CN107111549A (en) | The management method and device of a kind of file system | |
CN110083307A (en) | Date storage method, memory and server | |
CN108920105B (en) | Community structure-based distributed storage method and device for graph data | |
CN105718319A (en) | A memory pool layout analysis method and a memory pool device | |
CN116483740A (en) | Memory data migration method and device, storage medium and electronic device | |
WO2022120522A1 (en) | Memory space allocation method and device, and storage medium | |
CN104615490A (en) | Method and device for data conversion |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160203 |
|
WD01 | Invention patent application deemed withdrawn after publication |