Memory management method, device, medium and electronic device

By determining the memory allocation strategy based on the reference of the target object in the target thread, and allocating memory in the target allocation buffer or heap memory, the problem of low memory allocation speed in the existing technology is solved, and memory management efficiency is improved.

CN115599707BActive Publication Date: 2025-03-21BEIJING VOLCANO ENGINE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211321392.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2025-03-21
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

In the prior art, memory management methods have problems with low memory allocation speed, resulting in low memory management efficiency.

Method used

By obtaining the target object that is currently allocated in the target thread, determining the memory allocation strategy corresponding to the target object based on the target object's reference to other objects, and allocating memory to the target object in the target allocation buffer or heap memory of the target thread.

Benefits of technology

It improves the speed of memory allocation, reduces the number of times you apply for memory to the operating system or the lower-level memory management system, reduces the CPU usage of memory management-related codes, and thus improves memory management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115599707B_ABST
    Figure CN115599707B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a memory management method, device, medium and electronic device, the method comprising: obtaining a target object of memory to be currently allocated in a target thread; determining a memory allocation strategy corresponding to the target object according to the references of the target object to other objects, the memory allocation strategy comprising a first strategy and a second strategy, the first strategy indicating that a memory of a corresponding size is allocated to the target object in an allocation buffer of a heap memory, and the second strategy indicating that a memory of a corresponding size is allocated to the target object in the heap memory; according to the memory allocation strategy corresponding to the target object, memory is allocated to the target object in a target allocation buffer corresponding to the target thread, or memory is allocated to the target object in the heap memory, the target allocation buffer being used to allocate memory to multiple objects of the target thread corresponding to the first strategy. The method can improve the speed of memory allocation, thereby improving the efficiency of memory management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a memory management method, device, medium and electronic device. Background Art

[0002] In the field of computer technology, memory management is an important means to ensure efficient and stable operation of computers. Memory management can include multiple parts such as memory resource allocation and recycling. However, the memory management method in the related art has the problem of low memory allocation speed. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a memory management method, the method comprising:

[0005] Get the target object of the memory currently to be allocated in the target thread;

[0006] Determine a memory allocation strategy corresponding to the target object according to the references of the target object to other objects, the memory allocation strategy comprising a first strategy and a second strategy, the first strategy indicating that a memory of a corresponding size is allocated to the target object in an allocation buffer of a heap memory, and the second strategy indicating that a memory of a corresponding size is allocated to the target object in the heap memory;

[0007] According to the memory allocation strategy corresponding to the target object, memory is allocated for the target object in a target allocation buffer corresponding to the target thread, or memory is allocated for the target object in the heap memory, and the target allocation buffer is used to allocate memory for multiple objects of the target thread corresponding to the first strategy.

[0008] In a second aspect, the present disclosure provides a memory management device, the device comprising:

[0009] The first acquisition module is used to acquire the target object of the current memory to be allocated in the target thread;

[0010] A first determination module is used to determine a memory allocation strategy corresponding to the target object according to the references of the target object to other objects, wherein the memory allocation strategy includes a first strategy and a second strategy, wherein the first strategy indicates that a memory of a corresponding size is allocated to the target object in an allocation buffer of a heap memory, and the second strategy indicates that a memory of a corresponding size is allocated to the target object in the heap memory;

[0011] An allocation module is used to allocate memory for the target object in a target allocation buffer corresponding to the target thread or to allocate memory for the target object in the heap memory according to a memory allocation strategy corresponding to the target object, wherein the target allocation buffer is used to allocate memory for multiple objects of the target thread corresponding to the first strategy.

[0012] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the program is executed by a processing device.

[0013] In a fourth aspect, the present disclosure provides an electronic device, including:

[0014] a storage device having a computer program stored thereon;

[0015] A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect.

[0016] Through the above technical solution, by obtaining the target object of the current memory to be allocated in the target thread, according to the references of the target object to other objects, the memory allocation strategy corresponding to the target object is determined, and according to the memory allocation strategy corresponding to the target object, memory is allocated to the target object in the target allocation buffer corresponding to the target thread, or memory is allocated to the target object in the heap memory. Therefore, under the framework of the memory management algorithm, in addition to directly allocating memory of corresponding size to the target object in the heap memory, a larger memory can be applied for in the heap memory, and memory can be allocated to multiple objects corresponding to the first strategy of the target thread through the memory, so that the process of allocating memory to multiple objects corresponding to the first strategy of the target thread can be completed by applying for a target allocation buffer once, thereby reducing the number of times memory is applied to the operating system or the memory management system of the next layer, reducing the CPU occupancy of the memory management related code, thereby increasing the speed of memory allocation and improving the efficiency of memory management.

[0017] In addition, since the first strategy allocates memory in an allocation buffer in the heap memory, the first strategy can be regarded as a fast path for the second strategy, which can further improve the object memory allocation speed.

[0018] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0020] Figure 1 The figure is a flowchart of a memory management method according to an exemplary embodiment of the present disclosure.

[0021] Figure 2 The diagram is a schematic diagram of a structure of an object allocated in an allocation buffer according to an exemplary embodiment of the present disclosure.

[0022] Figure 3 The present invention is a block diagram of a memory management device according to an exemplary embodiment of the present invention.

[0023] Figure 4 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0031] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0032] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0033] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0034] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0035] In programming languages, an object is an abstraction of the objective world and a representation of the objective world in a computer. For example, a person or an object can be represented by an object in a computer. An object occupies memory and contains many attributes. The values ​​of the attributes are stored in the memory occupied by the object. The attribute of an object can be the address of another object, that is, a pointer to other objects. Other objects can be referenced through pointers.

[0036] An object is alive if it can be referenced by other alive objects. If an object cannot be referenced by other alive objects, then the object cannot be accessed and the memory space it occupies can be recycled and released. Otherwise, it will cause memory leaks, memory exhaustion, and the program will crash and cannot continue to run.

[0037] In the related art, there are many memory allocation and recycling technologies, but the inventors have found in long-term research that in these memory allocation technologies, each time memory is allocated for an object, it is necessary to apply for memory from the operating system or the memory management system at the next layer, and then allocate it. Since it is necessary to apply for memory multiple times, the memory allocation process is increased and the memory allocation speed is reduced. In addition, in these memory recovery technologies, the recovery and cleaning logic is also executed once for each unmarked object, so as to recycle the memory corresponding to the object. Since the recovery and cleaning logic needs to be executed multiple times, the memory recovery process is increased and the memory recovery and cleaning speed is reduced. It can be seen that the memory management method in the related art has the problem of slow memory allocation and memory recovery, which leads to low memory management efficiency.

[0038] In view of this, the embodiments of the present disclosure provide a memory management method, device, medium and electronic device to at least increase the memory allocation speed, thereby improving the memory management efficiency to a certain extent.

[0039] The embodiments of the present disclosure are further explained below with reference to the accompanying drawings.

[0040] Figure 1 is a flowchart of a memory management method according to an exemplary embodiment of the present disclosure. The memory management method can be applied to electronic devices, where the electronic devices can be, for example, mobile phones, tablet computers, and notebooks, etc. Figure 1 , the memory management method comprises the following steps:

[0041] S110, obtaining the target object of the current memory to be allocated in the target thread.

[0042] S120, determining a memory allocation strategy corresponding to the target object based on the target object's references to other objects, the memory allocation strategy including a first strategy and a second strategy, the first strategy indicating allocating a corresponding size of memory to the target object in an allocation buffer of the heap memory, and the second strategy indicating allocating a corresponding size of memory to the target object in the heap memory.

[0043] S130, according to the memory allocation strategy corresponding to the target object, allocate memory for the target object in the target allocation buffer corresponding to the target thread, or allocate memory for the target object in the heap memory, the target allocation buffer being used to allocate memory for multiple objects of the target thread corresponding to the first strategy.

[0044] Among them, the target thread can be the thread currently being executed in the electronic device. It can be understood that during the execution of the target thread, multiple objects can be allocated. These multiple objects can be allocated memory in a preset order. Therefore, the object currently ready to allocate memory in the target thread is the target object.

[0045] Among them, the heap memory is another memory area different from the stack area, global data area and code area. The heap allows threads to dynamically apply for a certain size of memory space during execution. Therefore, the target allocation buffer can be understood as a large memory space applied by the target thread in the heap memory.

[0046] In the disclosed embodiment, after acquiring each target object, the memory allocation strategy corresponding to the target object can be determined according to the references of the target object to other objects, that is, according to the references of the target object to other objects, it is determined whether the memory allocation strategy corresponding to the target object is the first strategy or the second strategy. If the memory allocation strategy is determined to be the first strategy, a corresponding size of free memory is allocated to the target object in the target allocation buffer corresponding to the target thread; if the memory allocation strategy is determined to be the second strategy, a corresponding size of free memory is allocated to the target object in the heap memory.

[0047] Wherein, free memory of a corresponding size is allocated to the target object in the heap memory, and the allocation can be performed using any memory allocation method in the existing memory management method.

[0048] Thus, by adopting the above method, by obtaining the target object of the current memory to be allocated in the target thread, according to the reference situation of the target object to other objects, the memory allocation strategy corresponding to the target object is determined, and according to the memory allocation strategy corresponding to the target object, memory is allocated to the target object in the target allocation buffer corresponding to the target thread, or memory is allocated to the target object in the heap memory. Thus, under the framework of the memory management algorithm, in addition to directly allocating a corresponding size of memory to the target object in the heap memory, a larger memory can also be applied for in the heap memory, and memory can be allocated to multiple objects corresponding to the first strategy of the target thread through the memory. Thus, in the case of applying for a target allocation buffer once, the process of allocating memory to multiple objects corresponding to the first strategy of the target thread can be completed, thereby reducing the number of times of applying for memory to the operating system or the memory management system of the next layer, reducing the CPU occupancy of the memory management related code, thereby increasing the speed of memory allocation and improving the efficiency of memory management.

[0049] In addition, since the first strategy allocates memory in the allocation buffer in the heap memory, the first strategy can be regarded as a fast path for the second strategy, which can further improve the object memory allocation speed. The use of a memory allocation method different from the second strategy in the related technology is an optimization of the allocation method in the existing memory management method.

[0050] Combined with the above content, it can be seen that when memory is reclaimed, if an object is referenced by a surviving object, then the object is also a surviving object. In addition, in the embodiment of the present disclosure, the allocation buffer can be regarded as a large object from the perspective of heap memory. During the memory reclamation phase, when at least one object in the allocation buffer survives, the allocation buffer is considered to be surviving. In this case, in order to reduce the memory usage after memory reclamation, in some embodiments, step S120 may include the following steps:

[0051] In response to the target object referencing other objects, determining that the memory allocation strategy corresponding to the target object is a second strategy;

[0052] In response to the target object not referencing other objects, it is determined that the memory allocation strategy corresponding to the target object is a first strategy.

[0053] In some implementations, whether the target object references other objects can be determined by whether the target object has a pointer pointing to the other object. When the target object has a pointer pointing to the other object, it is determined that the target object has referenced other objects, and when the target object does not have a pointer pointing to the other object, it is determined that the target object does not have referenced other objects.

[0054] The applicant discovered in a long-term study that, assuming that we allocate an object a containing a pointer in an allocation buffer, if there is an object b that survives in the allocation buffer, then the entire allocation buffer will be marked as alive. Therefore, regardless of whether object a is actually alive or not, object a will be marked as alive, which will cause the object pointed to by object a to be alive. Therefore, it is possible that because of marking object a as alive, a bunch of objects that could have been recycled will also be indirectly marked as alive, thereby increasing memory usage.

[0055] Therefore, in the embodiments of the present disclosure, when determining whether the target object uses the first strategy or the second strategy to allocate memory, it can be determined whether the target object references other objects. If it is determined that the target object references other objects, it can be determined that the memory allocation strategy corresponding to the target object is the second strategy, and then free memory of a corresponding size is allocated to the target object in the heap memory. If it is determined that the target object does not reference other objects, it can be determined that the memory allocation strategy corresponding to the target object is the first strategy.

[0056] That is, through the above method, only objects that do not reference other objects can be allocated in the allocation buffer, and objects that reference other objects can be directly allocated normally in the heap memory, thereby reducing the memory usage after subsequent memory recovery.

[0057] In addition, in some implementations, without considering the memory usage after the memory recycling phase, all target objects may be allocated memory using the first strategy. Alternatively, the first strategy or the second strategy may be randomly selected to allocate memory to the target objects.

[0058] In addition, considering that the memory management method may be executed to apply the first strategy to the target thread for the first time to perform object memory allocation, at this time there may be a situation where the target allocation buffer has not yet been applied for in the heap memory. Therefore, in some implementations, the method of the embodiment of the present disclosure may further include the following steps:

[0059] Determining whether a target allocation buffer is allocated for the target thread based on an address of an allocation buffer associated with the target thread;

[0060] When it is determined that no target allocation buffer is allocated for the target thread, a free memory space of a preset size is applied for in the heap memory as the target allocation buffer.

[0061] In an embodiment of the present disclosure, the target thread may be associated with the address of an allocation buffer. For example, the information saved by the target thread may be set to include a field corresponding to the address of the target allocation buffer, so that the address of the allocation buffer associated with the target thread may be obtained from the corresponding field, and then based on the address of the allocation buffer associated with the target thread, it may be determined whether the target allocation buffer is allocated to the target thread.

[0062] Exemplarily, if the address of the associated allocation buffer is a null value, it can be determined that no target allocation buffer is allocated for the target thread, so that a preset size of free memory space can be applied in the heap memory as the target allocation buffer. If the address of the associated allocation buffer is not a null value, it can be determined that a target allocation buffer has been allocated for the target thread, so that memory is directly allocated for the target object in the target allocation buffer corresponding to the target thread.

[0063] Optionally, the address of the associated allocation buffer may be any address in the allocation buffer, such as a start address, a currently used address, or an end address.

[0064] In some implementations, the preset size of free memory space applied for in the heap memory may be, for example, a space area of ​​1KB, 10KB, 100KB, etc., which is set according to actual needs.

[0065] In addition, considering that the size of an allocation buffer is limited and cannot be used infinitely to allocate memory for the target object, in some embodiments, allocating memory for the target object in the target allocation buffer corresponding to the target thread in step S130 may include the following steps:

[0066] Determine whether the free memory in the target allocation buffer supports allocating memory for the target object;

[0067] When it is determined that the free memory in the target allocation buffer supports the memory allocation for the target object, memory is allocated for the target object in the target allocation buffer;

[0068] When it is determined that the free memory in the target allocation buffer does not support memory allocation for the target object, a preset size of free memory space is applied for in the heap memory as a new target allocation buffer, and memory is allocated for the target object in the new target allocation buffer.

[0069] In the embodiment of the present disclosure, it can be determined first whether the free memory in the target allocation buffer supports the allocation of memory to the target object. If the free memory in the target allocation buffer supports the allocation of memory to the target object, memory is allocated to the target object in the target allocation buffer. If the free memory in the target allocation buffer does not support the allocation of memory to the target object, a preset size of free memory space can be applied for in the heap memory as a new target allocation buffer, and memory is allocated to the target object in the new target allocation buffer.

[0070] In some implementations, memory can be allocated to each target object in the target allocation buffer by means of pointer collision. In this case, it can be determined whether the sum of the currently used position in the target allocation buffer and the actual size of the target object is greater than the end position of the target allocation buffer to determine whether the free memory in the target allocation buffer supports the memory allocation for the target object.

[0071] Among them, allocating memory for objects by pointer collision can improve the object allocation speed. At the same time, it also utilizes the locality principle of the program to place objects that may be accessed in the near future in adjacent positions in space, increasing the CPU cache hit rate and thus improving program performance.

[0072] The following is an example to illustrate how to allocate memory for a target object in a target allocation buffer corresponding to a target thread in an embodiment of the present disclosure.

[0073] Exemplarily, assuming that the target thread is t, the address of the allocation buffer associated with thread t can be obtained. Further assuming that the address obtained is a null value, it is determined that no target allocation buffer is allocated for thread t. At this time, a 1KB memory space can be applied from the heap memory as the target allocation buffer corresponding to thread t. At this time, the target allocation buffer can be marked with three pointers, which are base, end, and top. Base represents the starting address of the target allocation buffer, end represents the ending address of the target allocation buffer, and top represents the current address of the target allocation buffer. At the same time, the value of any pointer can be assigned to the address of the allocation buffer associated with thread t to indicate that the target allocation buffer has been allocated for the target thread.

[0074] In addition, when allocating memory for the target object in the target allocation buffer corresponding to the target thread, the actual size S` of the object can be calculated based on the size of the object and the memory alignment rule, and the value of S`+top can be calculated and compared with end to determine whether the free memory in the target allocation buffer supports the allocation of memory for the target object. If the value of S`+top is less than or equal to the value of end, it is determined that the free memory in the target allocation buffer supports the allocation of memory for the target object, and then, memory is allocated to the target object in the target allocation buffer. If the value of S`+top is greater than the value of end, it is determined that the free memory in the target allocation buffer does not support the allocation of memory for the target object, and then, 1KB of free memory space is applied for again in the heap memory as a new target allocation buffer, and memory is allocated to each target object in the new target allocation buffer in the same way.

[0075] If memory is allocated by pointer collision, the first time memory is allocated in the target allocation buffer, the top value is equal to the base value, that is, memory allocation starts from the starting address of the allocation buffer. After the first object memory allocation is completed, top is moved to the position of S`+base. Then, the second time memory is allocated in the target allocation buffer, allocation starts from the top position obtained by the move, and so on, until the value of S`+top is greater than the value of end, and 1KB of free memory space is applied for again in the heap memory as the new target allocation buffer.

[0076] In some implementations, in addition to allocating memory for each target object in the target allocation buffer by means of pointer collision, memory for each target object in the target allocation buffer may also be allocated by means of randomly acquiring free memory.

[0077] In combination with the foregoing content, it can be known that in some implementations, the memory allocation strategy may include a first strategy and a second strategy. In this case, the memory allocation method of the embodiment of the present disclosure may further include the following steps:

[0078] When a preset memory recycling condition is met, a surviving first object and a surviving second object in the heap memory are marked, the first object being an object to which memory is allocated by applying the first strategy, and the second object being an object to which memory is allocated by applying the second strategy;

[0079] The unmarked second object and the candidate allocation buffer in the heap memory are recovered, and the candidate allocation buffer is an allocation buffer of the first object without the mark.

[0080] In some implementations, satisfying a preset recycling condition may be that a memory occupancy rate reaches a set threshold, or reaches a certain memory recycling cycle, etc.

[0081] In the embodiment of the present disclosure, whether the first object or the second object is alive can be determined by determining whether the first object or the second object is referenced by other alive objects as mentioned above.

[0082] After the surviving first objects and the surviving second objects in the heap memory are marked, the candidate allocation buffers of the unmarked second objects and the unmarked first objects in the heap memory may be further recycled.

[0083] In the disclosed embodiment, since the candidate allocation buffer can be recycled as a whole, the recycling logic only needs to be executed once to complete the recycling of multiple objects, reducing the number of times the recycling and cleaning logic is executed, increasing the memory recycling and cleaning speed, and thereby improving memory management efficiency.

[0084] There may be multiple situations in which there is no marked first object in the candidate allocation buffer. Optionally, the first objects in the candidate allocation buffer are all dead when recycled, and in this case, the first objects in the candidate allocation buffer will not be marked. Optionally, when the first objects in the candidate allocation buffer are recycled, part of them survive and part of them do not survive, and the surviving parts are moved to other memory spaces in the heap memory, so that all the first objects in the candidate allocation buffer are not marked.

[0085] As described above, considering that the first object in the candidate allocation buffer is partially alive and partially dead during recycling, the surviving part can be moved to other memory spaces in the heap memory, so that the first objects in the candidate allocation buffer are not marked at all. Therefore, in some embodiments, the memory allocation method of the embodiment of the present disclosure may further include the following steps:

[0086] Get the total memory usage of the first object marked in the heap memory;

[0087] Apply for the target memory space of the total memory usage size in the heap memory;

[0088] The first object marked in the heap memory is moved to the target memory space to obtain a candidate allocation buffer.

[0089] In some implementations, when first objects surviving in the heap memory are marked, the total memory usage of each marked first object may be calculated by accumulation.

[0090] In the embodiment of the present disclosure, after obtaining the total memory usage of each marked first object in the heap memory, a target memory space of the same size as the total memory usage can be applied for in the heap memory. Then, each marked first object in the heap memory can be moved to the target memory space. In this way, the marked first object no longer exists in the candidate allocation buffer.

[0091] In the embodiment of the present disclosure, by moving the first object marked in the heap memory, fragmentation of the memory in the allocation buffer can be avoided.

[0092] In some implementations, the object forwarding table and the pointer queue can be used to help move the marked first objects. The pointer queue stores the addresses of pointers that meet the following two conditions at the same time, such as the address &x.f, where xf represents a pointer. Assuming that the pointer xf points to the object o, the first condition is that the object x pointing to the object o is a live object, and the second condition is that the object o pointed to by xf is in the target allocation buffer. The forwarding table records the movement of the object. For example, if xf->y is recorded in the forwarding table, it means that the object o has moved to the new address y.

[0093] The following describes a process of moving a first object marked in a heap memory to a target memory space by taking an example.

[0094] Take out a pointer address from the pointer queue in sequence (assuming that the pointer queue includes 4 pointer addresses &x1.f1, &x2.f2, &x3.f3, &x4.f4, and the 4 pointer addresses correspond to the addresses of objects o1, o1, o2, and o2 in the allocation buffer respectively). Assuming that the address taken out this time is &x1.f1, dereference the address &x1.f1 to get the pointer x1.f1, which points to the object o1. According to the forwarding table, check whether the object o1 has moved. If o1 has not moved, move o1 to the target memory space according to the actual size of the object o1. After the move, record in the object forwarding table that the address pointed to by pointer x1.f1 has moved from address &x1.f1 to address y.

[0095] Next, assuming that the second address is &x2.f2, the address &x2.f2 is dereferenced to get the pointer x2.f2, which also points to the object o1. According to the forwarding table, the object o1 has been moved from the address &x1.f1 to the address y, which means that the object o1 pointed to by the pointer x2.f2 has been moved and does not need to be moved again. By analogy, the address &x3.f3 is taken out from the pointer queue again to determine whether to move the dereferenced object o2, until all the addresses in the pointer queue are processed, and the first object marked in the heap memory is moved to the target memory space.

[0096] If the pointer collision method is used to allocate memory for the target object in the target allocation buffer, the process of moving o1 to the target memory space is as follows according to the actual size of the object o1:

[0097] The starting address p of object o1 is obtained according to the object starting address marked when the object is allocated. Since the objects in the allocation buffer are allocated continuously, the size q of object o1 can be obtained according to the starting address p` of the object immediately following o1, |p`-p|.

[0098] xf does not need to point to the beginning of object o1. Based on the starting address p of object o1 and xf, |px.f| is the offset inside object o1, recorded as offset.

[0099] Move object o1 to the position pointed to by top of the target memory space. If it is the first object to be moved, top is the starting position of the target memory space.

[0100] Modify xf to y, where y = top + offset, that is, xf points to the new memory address after the move, thereby completing the move process of the first object of a mark. In addition, modify the value of top to Top + q to facilitate the next move.

[0101] In some implementations, there may be multiple first objects marked in the heap memory. In this case, multiple moving threads may be used to move in parallel to speed up the recycling and cleaning process.

[0102] In some embodiments, the memory allocated for the target object in the target allocation buffer is used to sequentially store metadata of the target object and content of the target object, wherein when the target object is referenced, the pointer referencing the target object points to the starting address of the content of the target object.

[0103] In the disclosed embodiment, in order to facilitate the management of the memory in the allocation buffer, metadata may be added to the object in the allocation buffer, for example, to record the starting address of the object, the size of the object, the transfer table and other information. In this case, in order to enable the second object to normally reference the first object and make the first object more transparent from the perspective of the heap memory, the metadata may be further set before the starting position of the content of the corresponding target object, and the pointer pointing to the target object may be set to point to the starting address of the content of the target object. Thus, each time the target object is referenced, the content corresponding to the object can be accurately obtained without obtaining the metadata.

[0104] For example, Figure 2 As shown, the target object includes metadata and content corresponding to the object. The metadata and content corresponding to the object occupy memory space respectively, and the pointer pointing to the target object points to the starting address of the content corresponding to the object.

[0105] Through the method in the above embodiment, since the allocation buffer is a larger object from the perspective of heap memory, the execution of the program does not need to know the detailed implementation of the allocation buffer, and the first object is transparent from the perspective of heap memory. Therefore, when using any of the existing memory management methods for memory allocation and memory recovery methods for allocation and recovery, the existence of the allocation buffer will not be perceived, and the allocation buffer can be treated as a whole object for normal marking and recovery. Therefore, there is no need to change the marking and recovery process of any existing memory management method, and no additional special processing is required, so that the allocation and movement process of the first object can be embedded in any existing memory management method. In addition, the objects allocated by the first strategy and the second strategy can have different object layouts. For example, the objects allocated by the second strategy may not contain metadata, and the objects allocated by the first strategy may include metadata, but the objects allocated by the two strategies are consistent at the memory management level, so it can be achieved that: the objects allocated by the first strategy can be managed by the first strategy and the second strategy at the same time, and the objects allocated by different strategies can reference each other.

[0106] Figure 3 is a block diagram of a memory management device according to an exemplary embodiment of the present disclosure, referring to Figure 3 , the memory management device 300 comprises:

[0107] A first acquisition module 310 is used to acquire a target object to be currently allocated memory in a target thread;

[0108] A first determination module 320 is used to determine a memory allocation strategy corresponding to the target object according to the references of the target object to other objects, wherein the memory allocation strategy includes a first strategy and a second strategy, wherein the first strategy indicates that a memory of a corresponding size is allocated to the target object in an allocation buffer of a heap memory, and the second strategy indicates that a memory of a corresponding size is allocated to the target object in the heap memory;

[0109] The allocation module 330 is used to allocate memory for the target object in the target allocation buffer corresponding to the target thread, or to allocate memory for the target object in the heap memory according to the memory allocation strategy corresponding to the target object. The target allocation buffer is used to allocate memory for multiple objects of the target thread corresponding to the first strategy.

[0110] Optionally, the first determination module 320 is further used to determine that the memory allocation strategy corresponding to the target object is the second strategy in response to the target object referencing other objects; and to determine that the memory allocation strategy corresponding to the target object is the first strategy in response to the target object not referencing other objects.

[0111] Optionally, the apparatus 300 further includes:

[0112] A second determination module, configured to determine whether a target allocation buffer is allocated for the target thread based on an address of an allocation buffer associated with the target thread;

[0113] The target allocation buffer application module is used to apply for a preset size of free memory space in the heap memory as the target allocation buffer when it is determined that the target allocation buffer is not allocated for the target thread.

[0114] Optionally, the allocation module 330 includes:

[0115] A determination submodule, used to determine whether the free memory in the target allocation buffer supports allocating memory for the target object;

[0116] A first allocation submodule, configured to allocate memory to the target object in the target allocation buffer when it is determined that the free memory in the target allocation buffer supports the allocation of memory to the target object;

[0117] The second allocation submodule is used to apply for free memory space of a preset size in the heap memory as a new target allocation buffer and allocate memory for the target object in the new target allocation buffer when it is determined that the free memory in the target allocation buffer does not support the memory allocation for the target object.

[0118] Optionally, the apparatus 300 further includes:

[0119] a marking module, used for marking a surviving first object and a surviving second object in the heap memory when a preset memory recycling condition is met, wherein the first object is an object to which memory is allocated by applying the first policy, and the second object is an object to which memory is allocated by applying the second policy;

[0120] The recycling module is used to recycle the unmarked second object and the candidate allocation buffer in the heap memory, where the candidate allocation buffer is the allocation buffer of the first object without the mark.

[0121] Optionally, the apparatus 300 further includes:

[0122] A second acquisition module is used to acquire the total memory usage of the first object marked in the heap memory;

[0123] A target memory space application module, used for applying for a target memory space of the size of the total memory occupancy in the heap memory;

[0124] A moving module is used to move the first object marked in the heap memory to the target memory space to obtain the candidate allocation buffer.

[0125] Optionally, the memory allocated for the target object in the target allocation buffer is used to store metadata of the target object and content of the target object in sequence, wherein, when the target object is referenced, the pointer referencing the target object points to the starting address of the content of the target object.

[0126] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0127] like Figure 4As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0128] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0129] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0130] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0131] In some embodiments, the electronic device can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0132] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0133] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains the target object to which memory is currently to be allocated in the target thread; determines a memory allocation strategy corresponding to the target object, wherein the memory allocation strategy includes a first strategy for allocating memory to the target object in an allocation buffer of a heap memory; and when it is determined that the memory allocation strategy is the first strategy, allocates memory to the target object in a target allocation buffer corresponding to the target thread, wherein the target allocation buffer is used to allocate memory to multiple objects of the target thread corresponding to the first strategy.

[0134] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0135] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0137] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0138] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0139] According to one or more embodiments of the present disclosure, Example 1 provides a memory management method, the method comprising:

[0140] Get the target object of the memory currently to be allocated in the target thread;

[0141] Determine a memory allocation strategy corresponding to the target object according to the references of the target object to other objects, the memory allocation strategy comprising a first strategy and a second strategy, the first strategy indicating that a memory of a corresponding size is allocated to the target object in an allocation buffer of a heap memory, and the second strategy indicating that a memory of a corresponding size is allocated to the target object in the heap memory;

[0142] According to the memory allocation strategy corresponding to the target object, memory is allocated for the target object in a target allocation buffer corresponding to the target thread, or memory is allocated for the target object in the heap memory, and the target allocation buffer is used to allocate memory for multiple objects of the target thread corresponding to the first strategy.

[0143] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein determining the memory allocation strategy corresponding to the target object includes:

[0144] In response to the target object referencing other objects, determining that the memory allocation strategy corresponding to the target object is the second strategy;

[0145] In response to the target object not referencing other objects, it is determined that the memory allocation strategy corresponding to the target object is the first strategy.

[0146] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein the method further includes:

[0147] Determining whether a target allocation buffer is allocated for the target thread based on an address of an allocation buffer associated with the target thread;

[0148] When it is determined that the target allocation buffer is not allocated for the target thread, a free memory space of a preset size is applied for in the heap memory as the target allocation buffer.

[0149] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein allocating memory for the target object in a target allocation buffer corresponding to the target thread includes:

[0150] Determine whether free memory in the target allocation buffer supports allocating memory for the target object;

[0151] In a case where it is determined that the free memory in the target allocation buffer supports allocating memory for the target object, allocating memory for the target object in the target allocation buffer;

[0152] When it is determined that the free memory in the target allocation buffer does not support memory allocation for the target object, a preset size of free memory space is applied for in the heap memory as a new target allocation buffer, and memory is allocated for the target object in the new target allocation buffer.

[0153] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein the method further includes:

[0154] When a preset memory recycling condition is met, marking a surviving first object and a surviving second object in the heap memory, the first object being an object to which memory is allocated by applying the first policy, and the second object being an object to which memory is allocated by applying the second policy;

[0155] The unmarked second object and the candidate allocation buffer in the heap memory are recovered, and the candidate allocation buffer is an allocation buffer where no marked first object exists.

[0156] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5, wherein the method further includes:

[0157] Obtaining the total memory usage of the first object marked in the heap memory;

[0158] Applying for a target memory space of the size of the total memory usage in the heap memory;

[0159] The first object marked in the heap memory is moved to the target memory space to obtain the candidate allocation buffer.

[0160] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 1, wherein the memory allocated for the target object in the target allocation buffer is used to store the metadata of the target object and the content of the target object in sequence, wherein, when the target object is referenced, the pointer referencing the target object points to the starting address of the content of the target object.

[0161] According to one or more embodiments of the present disclosure, Example 8 provides a memory management device, the device comprising:

[0162] The first acquisition module is used to acquire the target object of the current memory to be allocated in the target thread;

[0163] A first determination module is used to determine a memory allocation strategy corresponding to the target object according to the references of the target object to other objects, wherein the memory allocation strategy includes a first strategy and a second strategy, wherein the first strategy indicates that a memory of a corresponding size is allocated to the target object in an allocation buffer of a heap memory, and the second strategy indicates that a memory of a corresponding size is allocated to the target object in the heap memory;

[0164] An allocation module is used to allocate memory for the target object in a target allocation buffer corresponding to the target thread or to allocate memory for the target object in the heap memory according to a memory allocation strategy corresponding to the target object, wherein the target allocation buffer is used to allocate memory for multiple objects of the target thread corresponding to the first strategy.

[0165] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-7 when executed by a processing device.

[0166] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, including:

[0167] a storage device having a computer program stored thereon;

[0168] A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-7.

[0169] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0170] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0171] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A memory management method, characterized in that: The method comprises: Get the target object of the memory to be allocated in the target thread; In response to the target object not referencing other objects, determining that the memory allocation strategy corresponding to the target object is a first strategy; in response to the target object referencing other objects, determining that the memory allocation strategy corresponding to the target object is a second strategy, wherein the first strategy indicates that a memory of a corresponding size is allocated to the target object in an allocation buffer of a heap memory, and the second strategy indicates that a memory of a corresponding size is allocated to the target object in the heap memory; Allocate memory for the target object in the heap memory according to the memory allocation policy corresponding to the target object, or allocate memory for the target object in the target allocation buffer corresponding to the target thread when it is determined that the free memory in the target allocation buffer supports the memory allocation for the target object, wherein the target allocation buffer is used to allocate memory for multiple objects of the target thread corresponding to the first policy; The method further comprises: Based on the address of the allocation buffer associated with the target thread, it is determined whether a target allocation buffer is allocated for the target thread.

2. The method according to claim 1, characterized in that The method further comprises: When it is determined that the target allocation buffer is not allocated for the target thread, a free memory space of a preset size is applied for in the heap memory as the target allocation buffer.

3. The method according to claim 1, characterized in that The allocating memory for the target object in the target allocation buffer corresponding to the target thread includes: Determine whether free memory in the target allocation buffer supports allocating memory for the target object; When it is determined that the free memory in the target allocation buffer does not support memory allocation for the target object, a preset size of free memory space is applied for in the heap memory as a new target allocation buffer, and memory is allocated for the target object in the new target allocation buffer.

4. The method according to claim 1, characterized in that: The method further comprises: When a preset memory recycling condition is met, marking a surviving first object and a surviving second object in the heap memory, the first object being an object to which memory is allocated by applying the first policy, and the second object being an object to which memory is allocated by applying the second policy; The unmarked second object and the candidate allocation buffer in the heap memory are recovered, and the candidate allocation buffer is an allocation buffer where no marked first object exists.

5. The method according to claim 4, characterized in that The method further comprises: Obtaining the total memory usage of the first object marked in the heap memory; Applying for a target memory space of the size of the total memory usage in the heap memory; The first object marked in the heap memory is moved to the target memory space to obtain the candidate allocation buffer.

6. The method according to claim 1, characterized in that The memory allocated for the target object in the target allocation buffer is used to store metadata of the target object and content of the target object in sequence, wherein when the target object is referenced, the pointer referencing the target object points to the starting address of the content of the target object.

7. A memory management device, characterized in that: The device comprises: The first acquisition module is used to acquire the target object of the current memory to be allocated in the target thread; A first determination module is configured to determine that the memory allocation strategy corresponding to the target object is a second strategy in response to the target object referencing other objects; and to determine that the memory allocation strategy corresponding to the target object is a first strategy in response to the target object not referencing other objects, wherein the first strategy indicates that a memory of a corresponding size is allocated to the target object in an allocation buffer of a heap memory, and the second strategy indicates that a memory of a corresponding size is allocated to the target object in the heap memory; an allocation module, configured to allocate memory for the target object in the heap memory according to the memory allocation strategy corresponding to the target object, or allocate memory for the target object in the target allocation buffer corresponding to the target thread when it is determined that the free memory in the target allocation buffer supports the memory allocation for the target object, or the target allocation buffer is used to allocate memory for multiple objects of the target thread corresponding to the first strategy; The second determination module is used to determine whether a target allocation buffer is allocated for the target thread based on the address of the allocation buffer associated with the target thread.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 6 are implemented.

9. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for diagnosing Java system EMS memory leakage based on partition

    CN101339533A

  • Resource recovery method and apparatus

    CN108459898A