WO2023273564A1 - 虚拟机内存管理方法、装置、存储介质及电子设备 - Google Patents
虚拟机内存管理方法、装置、存储介质及电子设备 Download PDFInfo
- Publication number
- WO2023273564A1 WO2023273564A1 PCT/CN2022/089013 CN2022089013W WO2023273564A1 WO 2023273564 A1 WO2023273564 A1 WO 2023273564A1 CN 2022089013 W CN2022089013 W CN 2022089013W WO 2023273564 A1 WO2023273564 A1 WO 2023273564A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- memory
- module
- current
- memory usage
- preset
- Prior art date
Links
- 238000007726 management method Methods 0.000 title claims abstract description 33
- 238000000034 method Methods 0.000 claims abstract description 59
- 238000004590 computer program Methods 0.000 claims description 19
- 238000012545 processing Methods 0.000 claims description 15
- 238000011084 recovery Methods 0.000 claims description 15
- 230000008569 process Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000004064 recycling Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45583—Memory management, e.g. access or allocation
Definitions
- the present disclosure relates to the technical field of virtual machines, and in particular, to a virtual machine memory management method, device, storage medium, and electronic equipment.
- the present disclosure provides a virtual machine memory management method, including:
- the preset module is a module for storing objects that do not need to be included in memory statistics of the memory statistics module of the virtual machine;
- a virtual machine memory management device including:
- An acquisition module configured to acquire the current memory usage of a preset module in the virtual machine, wherein the preset module is a module for storing objects that do not need to be included in the memory statistics of the memory statistics module of the virtual machine;
- a determining module configured to determine the amount of memory to be hidden according to the current memory usage of the preset module
- An update module configured to update the total current memory usage counted by the memory statistics module according to the amount of memory to be hidden, wherein the total current memory usage counted by the memory statistics module does not include the memory to be hidden quantity.
- the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the virtual machine memory management method described in the above-mentioned first aspect are implemented.
- an electronic device including:
- a processing device configured to execute the computer program in the storage device, so as to implement the steps of the virtual machine memory management method in the first aspect above.
- the memory statistics module is used to count the memory used in the heap area of the virtual machine. Since the unstated memory counted by the memory statistics module can be used for allocation, the memory usage in the preset module is changed from the memory usage of the virtual machine The statistics of the memory statistics module are separated, so that the memory statistics module of the virtual machine will not count the memory usage in the preset module, which indirectly increases the memory that can be used for allocation in the heap area of the virtual machine, and avoids allocatable memory. Insufficient space, resulting in Java OOM exceptions caused by the inability to allocate memory for objects, thereby improving the reliability of the device.
- Fig. 1 is a flowchart of a virtual machine memory management method according to an exemplary embodiment of the present disclosure.
- Fig. 2 is a schematic diagram showing a comparison of virtual machine memory management divisions according to an exemplary embodiment of the present disclosure.
- Fig. 3 is another flowchart of a virtual machine memory management method according to an exemplary embodiment of the present disclosure.
- Fig. 4 is a block diagram of a virtual machine memory management device according to an exemplary embodiment of the present disclosure.
- Fig. 5 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure.
- the term “comprise” and its variations are open-ended, ie “including but not limited to”.
- the term “based on” is “based at least in part on”.
- the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
- the embodiment of the present disclosure provides a virtual machine memory management method to avoid the Java OOM exception caused by the inability to allocate memory for objects due to insufficient memory space in the heap area of the virtual machine, thereby improving the reliability of the device. sex.
- Fig. 1 is a flow chart showing a method for managing memory of a virtual machine according to an exemplary embodiment of the present disclosure.
- the virtual machine memory management method is applied to an electronic device. Referring to FIG. 1, the virtual machine memory management method includes:
- Step 101 obtaining the current memory usage of a preset module in the virtual machine, wherein the preset module is a module for storing objects that do not need to be included in the memory statistics of the memory statistics module of the virtual machine.
- the current memory usage represents the amount of memory already occupied in the preset module.
- the virtual machine may be an Android virtual machine.
- the preset module may be a module for storing JAVA large objects.
- the JAVA large object is an object of large data, such as pictures, videos, music, and the like.
- the objects managed by the module storing large objects are discrete and do not support the copy compression capability of continuous memory space. Therefore, even if the module occupies too much memory, the heap memory usage of the virtual machine exceeds the upper limit, but other The memory threshold of the contiguous memory space remains in the normal range, so it will not affect the copy compression capability during memory recovery. Therefore, choosing to separate the memory usage of the module storing large objects from the virtual machine statistics module will not destroy the virtual machine. Machine memory management.
- Step 102 Determine the amount of memory to be hidden according to the current memory usage of the preset module.
- the amount of memory to be hidden is the amount of memory that needs to be separated from the statistics of the memory statistics module of the virtual machine.
- Step 103 according to the amount of memory to be hidden, update the total amount of current memory usage counted by the memory statistics module, wherein the total amount of current memory usage counted by the memory statistics module does not include the amount of memory to be hidden.
- the memory statistics module counts the used memory in the JAVA heap area.
- FIG. 2 is a schematic diagram showing a comparison of virtual machine memory management division according to an exemplary embodiment of the present disclosure.
- A1 in FIG. A disclosed example diagram of virtual machine memory management division.
- the total amount of memory occupied by the memory statistics module that is, the heap Memory
- the LargeObjectSpace module i.e. the default module in this disclosure
- the Native Mem module here, the memory expansion part
- the total memory usage counted by the memory statistics module only includes one module, that is, the other space module, and does not include the memory corresponding to the Other Object object stored in LargeObjectSpace (that is, the preset module in this disclosure). It can be seen from Figure 2 that under the memory structure of A1, since the memory usage of the memory statistics module of the virtual machine needs to be limited to a certain amount of memory (for example, 512M in Figure 2), the memory usage of the LargeObjectSpace module is was intangibly restricted.
- the memory management module of the virtual machine will not count the memory usage of the LargeObjectSpace module, which indirectly improves the use range of the memory space of the LargeObjectSpace module and other space module, from the optimization of the memory management structure , to optimize the range of memory usage.
- the process of updating the requested memory by the memory statistics module of the virtual machine can be intercepted.
- the amount of memory to be hidden is subtracted from the total amount of current memory usage counted by the memory statistics module of the virtual machine, and then updated The parameter of the current total memory usage of the memory statistics module.
- update the current total memory usage counted by the memory statistics module of the virtual machine to ensure the timeliness and accuracy of the update.
- the update process of Heap::num_bytes_allocated_ can be intercepted through the proxy heap memory statistics update interface, where num_bytes_allocated_ represents the current total memory usage counted by the memory statistics module.
- the memory statistics module is used to count the memory used in the heap area in the virtual machine. Since the memory that has not been counted during the statistical process of the memory statistics module can be used for allocation, the memory usage in the preset module is changed from the virtual machine
- the memory statistics module of the virtual machine is separated from the statistics of the memory statistics module, so that the memory statistics module of the virtual machine will not count the memory usage in the preset module, which indirectly increases the memory that can be used for allocation in the heap area of the virtual machine, and avoids allocatable Insufficient memory space leads to Java OOM exceptions caused by the inability to allocate objects to memory, thereby improving the reliability of the device.
- the step of obtaining the current memory usage of the preset module in the virtual machine shown in FIG. 1 may include: determining that the memory allocation for the object is successful; obtaining the first memory usage of the preset module after the memory is successfully allocated for the object.
- Current memory footprint in this case, according to the current memory footprint of the preset module shown in Figure 1, the step of determining the amount of memory to be hidden may include: according to the first current memory footprint and before allocating memory for the object Preset the memory usage of the module to determine the amount of memory to be hidden.
- the amount of memory to be hidden is the corresponding memory size of the object.
- the current memory usage of the preset module may also include the memory allocated by the object applied for before the object applies for memory, because the memory allocated by the previously applied object has been " Therefore, in order to avoid repeated hiding from affecting data synchronization, the difference between the memory usage of the preset module before and after the object is allocated memory is used as the amount of memory to be hidden.
- the first current memory usage of the preset module is 100M.
- the current memory usage of the preset module is 120M, and the amount of memory to be hidden can be is the difference between the current memory usage and the first current memory usage, that is, 20M.
- the step of obtaining the current memory usage of the preset module in the virtual machine shown in FIG. 1 may include: determining that memory allocation for the object fails; obtaining the second current memory usage of the preset module in the virtual machine ; Execute memory recovery; obtain the third current memory usage of the preset module after the memory recovery is completed and the object is successfully allocated to the memory; in this case, the current memory usage according to the preset module shown in Figure 1
- the step of determining the amount of memory to be hidden may include: in the case that the second current memory usage is less than the third current memory usage, determining the amount of memory to be hidden according to the second current memory usage and the third current memory usage .
- the second current memory usage represents the actual memory usage of the preset module before the object is allocated.
- the amount of memory to be hidden may be a difference between the second current memory usage and the third current memory usage.
- the second current memory usage of the preset module is 100M, and the memory is reclaimed 40M, and after successfully allocating 40M of memory for the object, the third current memory usage of the preset module is 120M, which means that the objects in the 20M preset module were recovered during the recovery process.
- the memory of the default module is still occupied by 20M more than before the memory recovery. That is, in this process, the memory in the virtual machine needs to be hidden A part of the memory usage of the preset module in the statistics module, and the amount of memory to be hidden is the difference between the third current memory usage and the second current memory usage, that is, 20M.
- the method further includes: when the second current memory usage is greater than the third current memory usage, determining the memory compensation amount according to the second current memory usage and the third current memory usage; According to the memory compensation amount, the current total memory usage counted by the memory statistics module is updated, wherein the current total memory usage counted by the memory statistics module includes the memory compensation amount.
- the memory statistics module will update the total memory usage counted by the memory statistics module according to the recovered memory, and because the memory statistics module will still manage the memory usage in the preset modules, Considering that objects in some preset modules may be recycled during memory reclamation, and the memory usage in the preset modules reclaimed during the memory reclamation process will be managed by the memory statistics module, but the total memory usage counted by the previous memory statistics module is not Including the memory usage in the preset module, therefore, if no corresponding processing is performed, the memory usage in the other space module counted by the memory statistics module will be released, resulting in a serious impact on data synchronization.
- the second current memory usage is greater than the third current memory usage, it means that the memory in the default module reclaimed in this memory reclamation process is larger than the memory allocated for the object this time.
- the second current memory usage of the preset module is 100M, and 60M of memory is reclaimed, and after successfully allocating memory for the object of 30M, the third current memory usage of the preset module is 90M, which means that the objects in the 40M preset module were recovered during the recovery process.
- the memory of the preset module is less than 10M before the memory recovery. That is, in this process, the current statistics of the memory statistics module The total memory usage is compensated, and the compensation part is equal to the difference between the second current memory usage and the third current memory usage, that is, 10M.
- the memory in the recycled preset module is less than that of the object When allocated memory, continue to hide the redundant part, so that this part of memory can be separated from the statistics of the memory statistics module; The total amount of memory usage is compensated, avoiding the release of memory in the other space module, and ensuring data synchronization.
- the step of updating the total amount of current memory usage counted by the memory statistics module of the virtual machine may include: first determining the actual amount of memory and the memory to be hidden that the memory statistics module has not counted for the preset module The sum of the amount is less than the preset threshold, and then according to the amount of memory to be hidden, the current total memory usage counted by the memory statistics module of the virtual machine is updated.
- the actual amount of memory represents the amount of memory that is not counted by the current memory statistics module for the preset module.
- the present method if the sum of the actual amount of memory and the amount of memory to be hidden does not exceed the preset threshold, then according to the amount of memory to be hidden, the current total memory usage counted by the memory statistics module of the virtual machine is updated to realize dynamic control of the virtual machine.
- the hidden memory usage of the machine preset module meets the memory usage and customization requirements of different product forms, so as to ensure that the memory usage of the Native Merm module side of the virtual machine is maintained within a reasonable range, and prevent the preset module from occupying the memory of the Native Merm module without limit .
- the current memory usage of the preset module can be obtained in the following ways: get the current memory usage object of the preset module; decompile the current memory usage object to get the relative memory of the current memory usage object Address offset; get the current memory usage of the preset module according to the relative memory address offset of the current memory usage object.
- the current memory usage object of the preset module can be obtained through the proxy interface.
- a high-level language source program is compiled into an executable file
- decompilation is a reverse process, that is, a process of converting machine code (assembly language) into a high-level programming language.
- decompilation reference may be made to related technologies, which will not be repeated in this embodiment.
- the relative memory address offset represents the physical address offset of the current memory usage object relative to the initial physical address of the disk where the current memory usage object is located. According to the relative memory address offset, the current The location of the memory usage object, and then obtain the data of the current memory usage object. It can be understood that the data includes the current memory usage of the preset module. It should be noted that, the above-mentioned first current memory usage, second current memory usage and third current memory usage can all be obtained through the above method of obtaining the current memory usage of the preset module.
- the relative memory address offset of the current memory usage object can be determined, and then the preset module can be realized according to the relative memory address offset The current memory usage is read, so as to solve the problem that the memory usage of the preset module cannot be directly obtained in related technologies.
- the method further includes: obtaining object quantity objects of preset modules before and after allocating memory for the object for the first time; before obtaining the current memory usage of the preset modules in the virtual machine as shown in FIG. It is determined that the difference between the obtained two object quantity objects is a preset difference, and the preset difference is used to check whether the relative memory address offset of the current memory usage object is accurate.
- the acquisition of the object number object can refer to the acquisition method of the current memory usage object. Specifically, decompile the object number object to obtain the relative memory address offset of the object number object, and then obtain the data corresponding to the object number object according to the relative memory address offset. It can be understood that the data includes the number of objects .
- the preset difference is 1.
- InlineHook monitoring any function
- the relevant parameters can be changed during the execution process, so as to be compatible with different Android system versions.
- FIG. 4 is a block diagram of a virtual machine memory management device according to an exemplary embodiment of the present disclosure. Referring to FIG. 4 , it includes:
- An acquisition module 401 configured to acquire the current memory usage of a preset module in the virtual machine, wherein the preset module is a module for storing objects that do not need to be included in the memory statistics of the memory statistics module of the virtual machine;
- a determining module 402 configured to determine the amount of memory to be hidden according to the current memory usage of the preset module
- An update module 403, configured to update the total current memory usage counted by the memory statistics module according to the amount of memory to be hidden, wherein the total current memory usage counted by the memory statistics module does not include the memory to be hidden Hidden amount.
- the obtaining module 401 includes:
- the first memory determination sub-module is used to determine that memory allocation for the object is successful
- the first obtaining sub-module is used to obtain the first current memory usage of the preset module after memory is successfully allocated for the object;
- the determination module 402 includes:
- the first determining submodule is configured to determine the amount of memory to be hidden according to the first current memory usage and the memory usage of the preset module before allocating memory for the object.
- the obtaining module 401 includes:
- the second memory determines the sub-module, and determines that memory allocation for the object fails
- the second obtaining sub-module is used to obtain the second current memory usage of the preset module in the virtual machine
- the memory recovery sub-module is used to perform memory recovery
- the third obtaining sub-module is used to obtain the third current memory usage of the preset module after memory recovery is executed and memory is successfully allocated to the object;
- the determination module 402 includes:
- the second determining submodule is configured to determine according to the second current memory usage and the third current memory usage when the second current memory usage is smaller than the third current memory usage The amount of memory to be hidden.
- the device 400 also includes:
- a memory compensation determination module configured to determine according to the second current memory usage and the third current memory usage when the second current memory usage is greater than the third current memory usage memory offset
- the compensation module is configured to update the total current memory usage counted by the memory statistics module according to the memory compensation amount, wherein the current total memory usage counted by the memory statistics module includes the memory compensation amount.
- the update module 403 includes:
- a threshold determination submodule configured to determine that the sum of the actual amount of memory not counted by the preset module and the amount of memory to be hidden by the memory statistics module is less than a preset threshold
- the update sub-module is configured to update the current total memory usage counted by the memory statistics module according to the amount of memory to be hidden.
- the device 400 also includes:
- the current memory usage object acquisition module is used to acquire the current memory usage object of the preset module
- a memory address offset determining module configured to decompile the current memory usage object to obtain the relative memory address offset of the current memory usage object
- the memory amount obtaining module is configured to obtain the current memory usage of the preset module according to the relative memory address offset of the current memory usage object.
- the device 400 also includes:
- the object number object acquisition module is used to obtain the object number objects of the preset module before and after allocating memory for the object for the first time;
- a verification module configured to determine that the difference between the acquired two objects of the number of objects is a preset difference before the acquisition of the current memory usage of the preset module in the virtual machine, and the preset difference is used for Check whether the relative memory address offset of the current memory usage object is accurate.
- the virtual machine is an Android virtual machine
- the preset module is a module for storing JAVA large objects.
- an embodiment of the present disclosure further provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the virtual machine memory management method described in the method embodiment are implemented.
- an electronic device including:
- a processing device configured to execute the computer program in the storage device, so as to implement the steps of the virtual machine memory management method in the method embodiment.
- FIG. 5 it shows a schematic structural diagram of an electronic device 500 suitable for implementing an embodiment of the present disclosure.
- the terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like.
- the electronic device shown in FIG. 5 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
- an electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 501, which may be randomly accessed according to a program stored in a read-only memory (ROM) 502 or loaded from a storage device 508.
- ROM read-only memory
- RAM random access memory
- various appropriate actions and processes are executed by programs in the memory (RAM) 503 .
- RAM random access memory
- various programs and data necessary for the operation of the electronic device 500 are also stored.
- the processing device 501, ROM 502, and RAM 503 are connected to each other through a bus 504.
- An input/output (I/O) interface 505 is also connected to the bus 504 .
- the following devices can be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 507 such as a computer; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509.
- the communication means 509 may allow the electronic device 500 to perform wireless or wired communication with other devices to exchange data. While FIG. 5 shows electronic device 500 having various means, it is to be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
- embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
- the computer program may be downloaded and installed from a network via communication means 509, or from storage means 508, or from ROM 502.
- the processing device 501 When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
- the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
- a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
- a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
- a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
- Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
- the electronic device can communicate with any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium (for example, communication networks) interconnect.
- network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol)
- Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
- the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
- the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the current memory usage of the preset module in the virtual machine, wherein the preset Set the module as a module for storing objects that do not need to be included in the memory statistics module of the virtual machine; according to the current memory usage of the preset module, determine the amount of memory to be hidden; according to the amount of memory to be hidden, update The total amount of current memory usage counted by the memory statistics module, wherein the total amount of current memory usage counted by the memory statistics module does not include the amount of memory to be hidden.
- Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" or similar programming languages.
- the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
- the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
- LAN local area network
- WAN wide area network
- Internet service provider for example, using an Internet service provider to connected via the Internet.
- each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
- the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
- each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
- the modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not limit the module itself under certain circumstances, for example, the obtaining module may also be described as "a module for obtaining the current memory usage of a preset module in the virtual machine".
- FPGAs Field Programmable Gate Arrays
- ASICs Application Specific Integrated Circuits
- ASSPs Application Specific Standard Products
- SOCs System on Chips
- CPLD Complex Programmable Logical device
- 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, apparatus, or device.
- 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, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
- machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
- RAM random access memory
- ROM read only memory
- EPROM or flash memory erasable programmable read only memory
- CD-ROM compact disk read only memory
- magnetic storage or any suitable combination of the foregoing.
- Example 1 provides a virtual machine memory management method, including:
- the preset module is a module for storing objects that do not need to be included in memory statistics of the memory statistics module of the virtual machine;
- Example 2 provides the method of Example 1, the acquisition of the current memory usage of a preset module in a virtual machine includes:
- the determining the amount of memory to be hidden according to the current memory usage of the preset module includes:
- the amount of memory to be hidden is determined according to the first current memory usage and the memory usage of the preset module before allocating memory for the object.
- Example 3 provides the method of Example 1, and the acquisition of the current memory usage of a preset module in a virtual machine includes:
- the acquisition of the current memory usage of the preset modules in the virtual machine includes:
- the determining the amount of memory to be hidden according to the current memory usage of the preset module includes:
- the amount of memory to be hidden is determined according to the second current memory usage and the third current memory usage.
- Example 4 provides the method of Example 3, the method further comprising:
- the memory compensation amount update the total current memory usage counted by the memory statistics module, wherein the current total memory usage counted by the memory statistics module includes the memory compensation amount.
- Example 5 provides the method of Example 1: said updating the total current memory usage counted by the memory statistics module according to the amount of memory to be hidden, including:
- Example 6 provides the method of any one of Examples 1-5, and obtains the current memory usage of the preset module in the following manner:
- the current memory usage of the preset module is obtained according to the relative memory address offset of the current memory usage object.
- Example 7 provides the method of Example 6, the method further comprising:
- the preset difference is used to verify the current Whether the relative memory address offset of the memory footprint object is accurate.
- Example 7 provides the method of Example 7, the virtual machine is an Android virtual machine, and the preset module is a module for storing JAVA large objects.
- Example 9 provides a virtual machine memory management device, including:
- An acquisition module configured to acquire the current memory usage of a preset module in the virtual machine, wherein the preset module is a module for storing objects that do not need to be included in the memory statistics of the memory statistics module of the virtual machine;
- a determining module configured to determine the amount of memory to be hidden according to the current memory usage of the preset module
- An update module configured to update the total current memory usage counted by the memory statistics module according to the amount of memory to be hidden, wherein the total current memory usage counted by the memory statistics module does not include the memory to be hidden quantity.
- Example 10 provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of any one of the methods described in Examples 1-8 are implemented .
- Example 11 provides electronic equipment, including:
- a processing device configured to execute the computer program in the storage device to implement the steps of any one of the methods in Examples 1-8.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Memory System (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
本公开涉及一种虚拟机内存管理方法、装置、存储介质及电子设备,方法包括:获取虚拟机中预设模块的当前内存占用量,其中,预设模块为用于存储无需纳入虚拟机的内存统计模块内存统计的对象的模块;根据预设模块的当前内存占用量,确定内存待隐藏量;根据内存待隐藏量,更新内存统计模块统计的当前内存占用总量,内存统计模块统计的当前内存占用总量不包括内存待隐藏量,内存统计模块未统计的内存能够用于分配,虚拟机的内存统计模块不会统计到预设模块中的内存使用情况,间接提升了虚拟机堆区域中能够用于分配的内存,避免了因可分配内存的空间不足,导致无法为对象分配到内存引发的Java OOM异常,进而提升设备的可靠性。
Description
相关申请的交叉引用
本申请要求于2021年06月28日提交的,申请号为202110721733.4、发明名称为“虚拟机内存管理方法、装置、存储介质及电子设备”的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
本公开涉及虚拟机技术领域,具体地,涉及一种虚拟机内存管理方法、装置、存储介质及电子设备。
目前,互联网应用依然需要兼容低版本的电子设备,而随着各种应用的版本迭代和产品运营需求越来越频繁,每到重大活动或节日,各种图片或动画资源会在线上大量使用,由于需要为图片等分配的对象较多,可能导致虚拟机堆内存的使用空间不足,容易引发电子设备的Java OOM(Out Of Memory,内存溢出)异常,造成应用闪退,影响用户对电子设备的使用。
发明内容
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
第一方面,本公开提供一种虚拟机内存管理方法,包括:
获取虚拟机中预设模块的当前内存占用量,其中,所述预设模块为用于存储无需纳入所述虚拟机的内存统计模块内存统计的对象的模块;
根据所述预设模块的当前内存占用量,确定内存待隐藏量;
根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量不包括所述内存待隐藏量。
第二方面,本公开提供一种虚拟机内存管理装置,包括:
获取模块,用于获取虚拟机中预设模块的当前内存占用量,其中,所述预设模块为用于存储无需纳入所述虚拟机的内存统计模块内存统计的对象的模块;
确定模块,用于根据所述预设模块的当前内存占用量,确定内存待隐藏量;
更新模块,用于根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量不包括所述内存待隐藏量。
第三方面,本公开提供一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现上述第一方面中所述虚拟机内存管理方法的步骤。
第四方面,本公开提供一种电子设备,包括:
存储装置,其上存储有计算机程序;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现上述第一方面中所述虚拟机内存管理方法的步骤。
通过上述技术方案,内存统计模块用于统计虚拟机中堆区域已使用的内存,由于内存统计模块统计未统计的内存能够用于分配,因此,将预设模块中的内存占用量从虚拟机的内存统计模块的统计中脱离,以使虚拟机的内存统计模块不会统计到预设模块中的内存使用情况,间接提升了虚拟机堆区域中能够用于分配的内存,避免了因可分配内存的空间不足,导致无法为对象分配到内存引发的Java OOM异常,进而提升设备的可靠性。
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:
图1是根据本公共一示例性实施例示出的一种虚拟机内存管理方法的流程图。
图2是根据本公共一示例性实施例示出的一种虚拟机内存管理划分的对比示意图。
图3是根据本公共一示例性实施例示出的一种虚拟机内存管理方法的另一流程图。
图4是根据本公共一示例性实施例示出的一种虚拟机内存管理装置的框图。
图5是根据本公共一示例性实施例示出的一种电子设备的结构示意图。
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的 范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
正如背景技术所言,电子设备不断在丰富各种功能和提升性能,移动互联网也在迅猛发展,当初市面的各种互联网应用,早已变成综合型的旗舰级应用,应用安装包较大,且使用一段时间,占用磁盘内存高达1G。愈发复杂的应用,虽拥有更高的视觉体验,但对系统也同样有着更高的要求。正如背景技术所言,互联网应用依然需要兼容低版本电子设备,而在图片或动画资源会在线上大量使用时,由于需要分配的对象较多,可能导致虚拟机堆内存的使用空间不足,进而引发Java OOM异常,OOM异常将返回NULL对象,这将导致应用闪退。因此,如何在例如图片或动画资源在线上大量使用场景下避免电子设备出现Java OOM异常是至关重要的。
有鉴于此,本公开实施例提供一种虚拟机内存管理方法,以避免了因虚拟机堆区域可分配内存的空间不足,导致无法为对象分配到内存引发的Java OOM异常,进而提升设备的可靠性。
图1是根据本公开一示例性实施例示出的一种虚拟机内存管理方法的流程图。该虚拟机内存管理方法应用于电子设备,参照图1,该虚拟机内存管理方法包括:
步骤101,获取虚拟机中预设模块的当前内存占用量,其中,预设模块为用于存储无需纳入虚拟机的内存统计模块内存统计的对象的模块。
应当说明的是,当前内存占用量表征的预设模块中已占用的内存量。
示例地,虚拟机可以为安卓虚拟机。预设模块可以为存储JAVA大对象的模块。其中,JAVA大对象即大型数据的对象,大型数据例如图片、视频、音乐等。
应当说明的是,存储大对象的模块管理的对象是离散的,不支持连续内存空间的拷贝压缩能力,因此即使是该模块内存占用过多,导致虚拟机的堆内存使用超过了上限,但是其它连续内存空间的内存阈值仍然保持正常范围,因此不会影响到内存回收时的拷贝压缩 能力,因此,选择将存储大对象的模块的内存占用从虚拟机统计模块中脱离,也就不会破坏虚拟机的内存管理。
步骤102,根据预设模块的当前内存占用量,确定内存待隐藏量。
应当说明的是,内存待隐藏量是需要从虚拟机的内存统计模块脱离统计的内存量。
步骤103,根据内存待隐藏量,更新内存统计模块统计的当前内存占用总量,其中,内存统计模块统计的当前内存占用总量不包括内存待隐藏量。
需要说明的是,内存统计模块统计的是JAVA堆区域中的已使用的内存。
图2是根据本公开一示例性实施例示出的一种虚拟机内存管理划分的对比示意图,参照图2,图2中A1表征相关现有技术中的虚拟机内存管理划分示例图,A2表征本公开的一种虚拟机内存管理划分示例图。首先,应当说明的是,相关现有技术中和本公开中LargeObjectSpace模块的对象在内存管理上存在区别,具体的,在A1的内存管理划分中,内存统计模块统计的内存占用总量(即堆内存)包括两个模块,other space模块和LargeObjectSpace模块(即本公开中的预设模块),不包括图2中0~2G部分为虚拟机中的Native Mem模块(此处为内存扩展部分)。在A2的内存管理划分中,内存统计模块统计的内存占用总量仅包括1个模块,即other space模块,不包括LargeObjectSpace(即本公开中的预设模块)中存储的Other Object对象对应的内存占用,由图2可以看出,在A1的内存结构下,由于虚拟机的内存统计模块的内存占用需要限定在一定内存之下(例如图2中的512M),因此,LargeObjectSpace模块的内存占用就被无形的限制了。在A2的内存管理划分中,虚拟机的内存管理模块不会统计到LargeObjectSpace模块的内存使用情况,以此间接提升了LargeObjectSpace模块和other space模块的内存空间的使用范围,从对内存管理结构的优化,来实现内存使用空间范围的优化。
示例地,可以拦截虚拟机的内存统计模块更新已申请内存的过程,在此过程中,从虚拟机的内存统计模块统计的当前内存占用总量中减去内存待隐藏量这一部分,进而再更新内存统计模块的当前内存占用总量这一参数。在内存统计模块更新已申请内存的过程中更新虚拟机的内存统计模块统计的当前内存占用总量,以确保更新的及时性和精准性。
示例地,可以通过代理堆内存统计更新接口来拦截Heap::num_bytes_allocated_的更新过程,num_bytes_allocated_即表征内存统计模块统计的当前内存占用总量。
通过上述方式,内存统计模块用于统计虚拟机中堆区域已使用的内存,由于内存统计模块统计过程中未统计的内存能够用于分配,因此,将预设模块中的内存占用量从虚拟机的内存统计模块的统计中脱离,以使虚拟机的内存统计模块不会统计到预设模块中的内存使用情况,间接提升了虚拟机堆区域中能够用于分配的内存,避免了因可分配内存的空间不足,导致无法为对象分配到内存引发的Java OOM异常,进而提升设备的可靠性。
为了使得本领域技术人员更加理解本公开提供的虚拟机内存管理方法,下面根据图3,对本公开的上述各步骤进行进一步解释说明。
在可能的方式中,图1中所示的获取虚拟机中预设模块的当前内存占用量的步骤可以包括:确定为对象分配内存成功;获取在为对象成功分配内存后预设模块的第一当前内存占用量;在此情况下,图1中所示的根据预设模块的当前内存占用量,确定内存待隐藏量的步骤可以包括:根据第一当前内存占用量和在为对象分配内存之前预设模块的内存占用量,确定内存待隐藏量。
应当理解的是,在对象的内存申请成功前后,内存待隐藏量即为该对象所对应的内存占用大小。
需要说明的是,在多次内存隐藏中,预设模块的当前内存占用量中也可能包括了此次对象申请内存之前申请的对象所分配的内存,由于之前申请的对象所分配的内存已经“隐藏”过了,因此,为了避免重复隐藏影响数据同步,将为对象分配内存成功前后的预设模块的内存占用量之差作为内存待隐藏量。
示例地,在为对象成功分配内存前,预设模块的第一当前内存占用量为100M,在为对象成功分配内存后,预设模块的当前内存占用量为120M,则内存待隐藏量则可以为该当前内存占用量与第一当前内存占用量之差,即20M。
在可能的方式中,图1中所示的获取虚拟机中预设模块的当前内存占用量的步骤可以包括:确定为对象分配内存失败;获取虚拟机中预设模块的第二当前内存占用量;执行内存回收;获取执行完内存回收且为所述对象成功分配到内存后预设模块的第三当前内存占用量;在此情况下,图1中所示的根据预设模块的当前内存占用量,确定内存待隐藏量的步骤可以包括:在第二当前内存占用量小于第三当前内存占用量的情况下,根据第二当前内存占用量和第三当前内存占用量,确定内存待隐藏量。
需要说明的是,在本领域中,为对象分配内存失败后会执行内存回收,以便于增大可以使用的内存。
需要说明的是,第二当前内存占用量表征在对对象分配之前预设模块的实际内存占用量。
示例地,内存待隐藏量可以为第二当前内存占用量和第三当前内存占用量之间的差值。
示例地,在为对象分配内存失败后,预设模块的第二当前内存占用量为100M,内存回收了40M,且为该对象成功分配内存40M后,预设模块的第三当前内存占用量为120M,表征此次回收过程中回收了20M预设模块中的对象,分配成功后较内存回收前,仍多占用了预设模块20M内存,即在此次过程中,还需要隐藏虚拟机中内存统计模块中对预设模块的一部分内存占用,且内存待隐藏量为第三当前内存占用量与第二当前内存占用量之差, 即20M。
在可能的方式中,所述方法还包括:在第二当前内存占用量大于第三当前内存占用量的情况下,根据第二当前内存占用量和第三当前内存占用量,确定内存补偿量;根据内存补偿量,更新内存统计模块统计的当前内存占用总量,其中,内存统计模块统计的当前内存占用总量包括所述内存补偿量。
需要说明的是,在内存回收过程中,内存统计模块会依据回收的内存对内存统计模块统计的内存占用总量进行更新,且由于内存统计模块仍然会对预设模块中的内存占用进行管理,考虑到内存回收中可能会回收部分预设模块中的对象,且内存回收过程中回收的预设模块中的内存占用会被内存统计模块进行管理,但此前内存统计模块统计的内存占用总量不包括预设模块中的内存占用部分,因此,若不进行相应处理,会造成对内存统计模块对统计的other space模块中的内存占用进行释放,导致数据同步受到严重影响。
应当可以理解的是,在第二当前内存占用量大于第三当前内存占用量的情况下,表征此次内存回收过程中回收的预设模块中的内存大于此次为对象分配的内存。
示例地,在为对象分配内存失败后,预设模块的第二当前内存占用量为100M,内存回收了60M,且为该对象成功分配内存30M后,预设模块的第三当前内存占用量为90M,表征此次回收过程中回收了40M预设模块中的对象,分配成功后较内存回收前,少占用了预设模块10M内存,即在此次过程中,需要对内存统计模块统计的当前内存占用总量进行补偿,补偿部分即等于第二当前内存占用量与第三当前内存占用量的差值,即10M。
通过上述方式,利用回收前预设模块的内存占用量和内存回收后且成功为对象分配到内存后预设模块的内存占用量的大小关系,在回收的预设模块中的内存小于为该对象分配的内存时,继续对多余的部分进行隐藏,以便于这部分内存脱离内存统计模块的统计;在回收的预设模块中的内存大于为该对象分配的内存时,对内存统计模块统计的当前内存占用总量进行补偿,避免了对other space模块中的内存进行释放的情况,确保了数据同步。
在可能的方式中,根据内存待隐藏量,更新虚拟机的内存统计模块统计的当前内存占用总量的步骤可以包括:先确定内存统计模块针对预设模块未统计的实际内存量和内存待隐藏量之和小于预设阈值,再根据内存待隐藏量,更新虚拟机的内存统计模块统计的当前内存占用总量。
应当说明的是,实际内存量表征当前内存统计模块对预设模块未统计的内存量。
需要说明的是,预设模块中对象实际是占用的Native Merm模块中的内存空间。
通过上述方式,在实际内存量和内存待隐藏量之和不超过预设阈值的情况下,再根据内存待隐藏量,更新虚拟机的内存统计模块统计的当前内存占用总量,实现动态控制虚拟机预设模块隐藏的内存占用,满足不同产品形态的内存使用及定制需求,以此来确保保证 虚拟机Native Merm模块侧内存占用维持在合理范围,避免预设模块无限制占用Native Merm模块的内存。
在可能的方式中,可以通过以下方式获取预设模块的当前内存占用量:获取预设模块的当前内存占用量对象;对当前内存占用量对象进行反编译,得到当前内存占用量对象的相对内存地址偏移;根据当前内存占用量对象的相对内存地址偏移,获取预设模块的当前内存占用量。
应当说明的的是,当前内存占用量对象可以用“num_bytes_allocated_”表示。
示例地,可以通过代理接口来获取预设模块的当前内存占用量对象。
示例地,高级语言源程序经过编译变成可执行文件,反编译就是逆过程,也就是将机器码(汇编语言)转换为高级编程语言的过程。反编译的实施方法可以参考相关技术,本实施例在此不作赘述。
需要说明的是,相对内存地址偏移表征当前内存占用量对象相对于当前内存占用量对象所在磁盘的起始物理地址的物理地址偏移量,根据该相对内存地址偏移,可直接定位到当前内存占用量对象的位置,进而获取当前内存占用量对象的数据,可以理解的是,该数据包括预设模块的当前内存占用量。需要说明的是,上述的第一当前内存占用量、第二当前内存占用量和第三当前内存占用量均可以通过上述获取预设模块的当前内存占用量的方式获取到。
由于虚拟机并没有对外直接暴露获取预设模块的内存占用的接口,因此,通过上述方式,可以确定当前内存占用量对象的相对内存地址偏移,进而根据相对内存地址偏移来实现预设模块的当前内存占用量的读取,以此来解决相关技术中无法直接获取预设模块的内存占用量问题。
在可能的方式中,所述方法还包括:在首次为对象分配内存的前后分别获取预设模块的对象数量对象;在图1所示的获取虚拟机中预设模块的当前内存占用量之前,确定获取到的两个对象数量对象的差值为预设差值,预设差值用于校验当前内存占用量对象的相对内存地址偏移是否准确。
应当说明的的是,对象数量对象可以用“num_objects_allocated_”表示。
其中,对象数量对象的获取可以参照当前内存占用量对象的获取方式。具体的,对对象数量对象进行反编译,得到对象数量对象的相对内存地址偏移,再根据该相对内存地址偏移,获取对象数量对象对应的数据,可以理解的是,该数据包括对象的数量。
示例地,预设差值为1。
具体来讲,需要在首次为对象分配内存的前后分别获取对象数量对象,并根据获取的两个对象数量对象的差值是否为预设差值来确定是否执行图1所示的获取虚拟机中预设模 块的当前内存占用量的步骤,且在确定获取到的两个实例数量对象的差值为预设差值的情况下,再执行获取虚拟机中预设模块的当前内存占用量的步骤。
通过上述方式,对对象数量对象进行差值校验,如果差值等于1,则说明相对内存地址偏移计算正常,否则相对内存地址偏移计算错误,以此来保证获取预设模块的内存占用的准确性和可靠性。
在可能的方式中,可以通过InlineHook(监视任意函数)去代理相关步骤所关联的接口,在执行过程中更改相关参数即可,以此来兼容不同的安卓系统版本。
在本实施例中,InlineHook的实施过程可以参考相关技术,本实施例在此不作限定。
基于同一发明构思,本公开实施例提供一种虚拟机内存管理装置,图4是根据本公共一示例性实施例示出的一种虚拟机内存管理装置的框图,参照图4,包括:
获取模块401,用于获取虚拟机中预设模块的当前内存占用量,其中,所述预设模块为用于存储无需纳入所述虚拟机的内存统计模块内存统计的对象的模块;
确定模块402,用于根据所述预设模块的当前内存占用量,确定内存待隐藏量;
更新模块403,用于根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量不包括所述内存待隐藏量。
可选地,所述获取模块401包括:
第一内存确定子模块,用于确定为对象分配内存成功;
第一获取子模块,用于获取在为所述对象成功分配内存后所述预设模块的第一当前内存占用量;
所述确定模块402包括:
第一确定子模块,用于根据所述第一当前内存占用量和在为所述对象分配内存之前所述预设模块的内存占用量,确定所述内存待隐藏量。
可选地,所述获取模块401包括:
第二内存确定子模块,确定为对象分配内存失败;
第二获取子模块,用于获取所述虚拟机中预设模块的第二当前内存占用量;
内存回收子模块,用于执行内存回收;
第三获取子模块,用于获取执行完内存回收且为所述对象成功分配到内存后后所述预设模块的第三当前内存占用量;
所述确定模块402包括:
第二确定子模块,用于在所述第二当前内存占用量小于所述第三当前内存占用量的情况下,根据所述第二当前内存占用量和所述第三当前内存占用量,确定所述内存待隐藏量。
可选地,所述装置400还包括:
内存补偿量确定模块,用于在所述第二当前内存占用量大于所述第三当前内存占用量的情况下,根据所述第二当前内存占用量和所述第三当前内存占用量,确定内存补偿量;
补偿模块,用于根据所述内存补偿量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量包括所述内存补偿量。
可选地,所述更新模块403包括:
阈值确定子模块,用于确定所述内存统计模块针对所述预设模块未统计的实际内存量与所述内存待隐藏量之和小于预设阈值;
更新子模块,用于根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量。
可选地,所述装置400还包括:
当前内存占用量对象获取模块,用于获取获取所述预设模块的当前内存占用量对象;
内存地址偏移确定模块,用于对所述当前内存占用量对象进行反编译,得到所述当前内存占用量对象的相对内存地址偏移;
内存量获取模块,用于根据所述当前内存占用量对象的相对内存地址偏移,获取所述预设模块的当前内存占用量。
可选地,所述装置400还包括:
对象数量对象获取模块,用于在首次为对象分配内存的前后分别获取所述预设模块的对象数量对象;
校验模块,用于在所述获取虚拟机中预设模块的当前内存占用量之前确定获取到的两个所述对象数量对象的差值为预设差值,所述预设差值用于校验所述当前内存占用量对象的相对内存地址偏移是否准确。
可选地,所述虚拟机为安卓虚拟机,所述预设模块为存储JAVA大对象的模块。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
基于同一发明构思,本公开实施例还提供一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现方法实施例中所述虚拟机内存管理方法的步骤。
基于同一发明构思,本公开实施例还提供一种电子设备,包括:
存储装置,其上存储有计算机程序;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现方法实施例中所述虚拟机内存管理方法的步骤。
下面参考图5,其示出了适于用来实现本公开实施例的电子设备500的结构示意图。 本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图5所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还 可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,电子设备可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取虚拟机中预设模块的当前内存占用量,其中,所述预设模块为用于存储无需纳入所述虚拟机的内存统计模块内存统计的对象的模块;根据所述预设模块的当前内存占用量,确定内存待隐藏量;根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量不包括所述内存待隐藏量。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可 以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,获取模块还可以被描述为“获取虚拟机中预设模块的当前内存占用量的模块”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,示例1提供了一种虚拟机内存管理方法,包括:
获取虚拟机中预设模块的当前内存占用量,其中,所述预设模块为用于存储无需纳入所述虚拟机的内存统计模块内存统计的对象的模块;
根据所述预设模块的当前内存占用量,确定内存待隐藏量;
根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量不包括所述内存待隐藏量。
根据本公开的一个或多个实施例,示例2提供了示例1的方法,所述获取虚拟机中预设模块的当前内存占用量,包括:
确定为对象分配内存成功;
获取在为所述对象成功分配内存后所述预设模块的第一当前内存占用量;
所述根据所述预设模块的当前内存占用量,确定内存待隐藏量,包括:
根据所述第一当前内存占用量和在为所述对象分配内存之前所述预设模块的内存占用量,确定所述内存待隐藏量。
根据本公开的一个或多个实施例,示例3提供了示例1的方法,所述获取虚拟机中预 设模块的当前内存占用量,包括:
所述获取虚拟机中预设模块的当前内存占用量,包括:
确定为对象分配内存失败;
获取所述虚拟机中预设模块的第二当前内存占用量;
执行内存回收;
获取执行完内存回收且为所述对象成功分配到内存后所述预设模块的第三当前内存占用量;
所述根据所述预设模块的当前内存占用量,确定内存待隐藏量,包括:
在所述第二当前内存占用量小于所述第三当前内存占用量的情况下,根据所述第二当前内存占用量和所述第三当前内存占用量,确定所述内存待隐藏量。
根据本公开的一个或多个实施例,示例4提供了示例3的方法,所述方法还包括:
在所述第二当前内存占用量大于所述第三当前内存占用量的情况下,根据所述第二当前内存占用量和所述第二当前内存占用量,确定内存补偿量;
根据所述内存补偿量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量包括所述内存补偿量。
根据本公开的一个或多个实施例,示例5提供了示例1的方法:所述根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,包括:
确定所述内存统计模块针对所述预设模块未统计的实际内存量与所述内存待隐藏量之和小于预设阈值;
根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量。
根据本公开的一个或多个实施例,示例6提供了示例1-5中任一一项的方法,通过以下方式获取所述预设模块的当前内存占用量:
获取所述预设模块的当前内存占用量对象;
对所述当前内存占用量对象进行反编译,得到所述当前内存占用量对象的相对内存地址偏移;
根据所述当前内存占用量对象的相对内存地址偏移获取所述预设模块的当前内存占用量。
根据本公开的一个或多个实施例,示例7提供了示例6的方法,所述方法还包括:
在首次为对象分配内存的前后分别获取所述预设模块的对象数量对象;
在所述获取虚拟机中预设模块的当前内存占用量之前,确定获取到的两个所述对象数量对象的差值为预设差值,所述预设差值用于校验所述当前内存占用量对象的相对内存地址偏移是否准确。
根据本公开的一个或多个实施例,示例7提供了示例7的方法,所述虚拟机为安卓虚拟机,所述预设模块为存储JAVA大对象的模块。
根据本公开的一个或多个实施例,示例9提供了一种虚拟机内存管理装置,包括:
获取模块,用于获取虚拟机中预设模块的当前内存占用量,其中,所述预设模块为用于存储无需纳入所述虚拟机的内存统计模块内存统计的对象的模块;
确定模块,用于根据所述预设模块的当前内存占用量,确定内存待隐藏量;
更新模块,用于根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量不包括所述内存待隐藏量。
根据本公开的一个或多个实施例,示例10提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现示例1-8中任一项所述方法的步骤。
根据本公开的一个或多个实施例,示例11提供了电子设备,包括:
存储装置,其上存储有计算机程序;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例1-8中任一项所述方法的步骤。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
Claims (11)
- 一种虚拟机内存管理方法,其特征在于,包括:获取虚拟机中预设模块的当前内存占用量,其中,所述预设模块为用于存储无需纳入所述虚拟机的内存统计模块内存统计的对象的模块;根据所述预设模块的当前内存占用量,确定内存待隐藏量;根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量不包括所述内存待隐藏量。
- 根据权利要求1所述的方法,其特征在于,所述获取虚拟机中预设模块的当前内存占用量,包括:确定为对象分配内存成功;获取在为所述对象成功分配内存后所述预设模块的第一当前内存占用量;所述根据所述预设模块的当前内存占用量,确定内存待隐藏量,包括:根据所述第一当前内存占用量和在为所述对象分配内存之前所述预设模块的内存占用量,确定所述内存待隐藏量。
- 根据权利要求1所述的方法,其特征在于,所述获取虚拟机中预设模块的当前内存占用量,包括:确定为对象分配内存失败;获取所述虚拟机中预设模块的第二当前内存占用量;执行内存回收;获取执行完内存回收且为所述对象成功分配到内存后所述预设模块的第三当前内存占用量;所述根据所述预设模块的当前内存占用量,确定内存待隐藏量,包括:在所述第二当前内存占用量小于所述第三当前内存占用量的情况下,根据所述第二当前内存占用量和所述第三当前内存占用量,确定所述内存待隐藏量。
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:在所述第二当前内存占用量大于所述第三当前内存占用量的情况下,根据所述第二当前内存占用量和所述第三当前内存占用量,确定内存补偿量;根据所述内存补偿量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量包括所述内存补偿量。
- 根据权利要求1所述的方法,其特征在于,所述根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,包括:确定所述内存统计模块针对所述预设模块未统计的实际内存量与所述内存待隐藏量之和小于预设阈值;根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量。
- 根据权利要求1-5任一所述的方法,其特征在于,通过以下方式获取所述预设模块的当前内存占用量:获取所述预设模块的当前内存占用量对象;对所述当前内存占用量对象进行反编译,得到所述当前内存占用量对象的相对内存地址偏移;根据所述当前内存占用量对象的相对内存地址偏移,获取所述预设模块的当前内存占用量。
- 根据权利要求6所述的方法,其特征在于,所述方法还包括:在首次为对象分配内存的前后分别获取所述预设模块的对象数量对象;在所述获取虚拟机中预设模块的当前内存占用量之前,确定获取到的两个所述对象数量对象的差值为预设差值,所述预设差值用于校验所述当前内存占用量对象的相对内存地址偏移是否准确。
- 根据权利要求7所述的方法,其特征在于,所述虚拟机为安卓虚拟机,所述预设模块为存储JAVA大对象的模块。
- 一种虚拟机内存管理装置,其特征在于,包括:获取模块,用于获取虚拟机中预设模块的当前内存占用量,其中,所述预设模块为用于存储无需纳入所述虚拟机的内存统计模块内存统计的对象的模块;确定模块,用于根据所述预设模块的当前内存占用量,确定内存待隐藏量;更新模块,用于根据所述内存待隐藏量,更新所述内存统计模块统计的当前内存占用总量,其中,所述内存统计模块统计的所述当前内存占用总量不包括所述内存待隐藏量。
- 一种计算机可读介质,其上存储有计算机程序,其特征在于,该程序被处理装置执行时实现权利要求1-8中任一项所述方法的步骤。
- 一种电子设备,其特征在于,包括:存储装置,其上存储有计算机程序;处理装置,用于执行所述存储装置中的所述计算机程序,以实现权利要求1-8中任一项所述方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110721733.4 | 2021-06-28 | ||
CN202110721733.4A CN113391882B (zh) | 2021-06-28 | 2021-06-28 | 虚拟机内存管理方法、装置、存储介质及电子设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023273564A1 true WO2023273564A1 (zh) | 2023-01-05 |
Family
ID=77624346
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/089013 WO2023273564A1 (zh) | 2021-06-28 | 2022-04-25 | 虚拟机内存管理方法、装置、存储介质及电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113391882B (zh) |
WO (1) | WO2023273564A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113391882B (zh) * | 2021-06-28 | 2023-12-22 | 北京字节跳动网络技术有限公司 | 虚拟机内存管理方法、装置、存储介质及电子设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170139824A1 (en) * | 2015-11-12 | 2017-05-18 | Facebook, Inc. | Memory management and image display for mobile devices |
CN107967205A (zh) * | 2016-10-18 | 2018-04-27 | 广州市动景计算机科技有限公司 | 一种内存分析方法、装置、系统以及计算设备 |
CN108958891A (zh) * | 2018-07-26 | 2018-12-07 | 郑州云海信息技术有限公司 | 一种虚拟机内存分配方法、装置及终端 |
CN113391882A (zh) * | 2021-06-28 | 2021-09-14 | 北京字节跳动网络技术有限公司 | 虚拟机内存管理方法、装置、存储介质及电子设备 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6941410B1 (en) * | 2000-06-02 | 2005-09-06 | Sun Microsystems, Inc. | Virtual heap for a virtual machine |
CN101221535B (zh) * | 2008-01-25 | 2010-06-09 | 中兴通讯股份有限公司 | Java虚拟机的垃圾回收移动通信终端及回收方法 |
US8799615B2 (en) * | 2010-10-21 | 2014-08-05 | International Business Machines Corporation | Organization of a small object area and a large object area in a java heap |
CN108073441B (zh) * | 2016-11-14 | 2022-05-10 | 阿里巴巴集团控股有限公司 | 一种虚拟机内存监管方法与设备 |
US10565104B2 (en) * | 2017-08-01 | 2020-02-18 | International Business Machines Corporation | System and method to manage and share managed runtime memory for JAVA virtual machine |
CN111651236A (zh) * | 2020-05-11 | 2020-09-11 | 腾讯科技(深圳)有限公司 | 虚拟机内存优化处理方法及相关装置 |
-
2021
- 2021-06-28 CN CN202110721733.4A patent/CN113391882B/zh active Active
-
2022
- 2022-04-25 WO PCT/CN2022/089013 patent/WO2023273564A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170139824A1 (en) * | 2015-11-12 | 2017-05-18 | Facebook, Inc. | Memory management and image display for mobile devices |
CN107967205A (zh) * | 2016-10-18 | 2018-04-27 | 广州市动景计算机科技有限公司 | 一种内存分析方法、装置、系统以及计算设备 |
CN108958891A (zh) * | 2018-07-26 | 2018-12-07 | 郑州云海信息技术有限公司 | 一种虚拟机内存分配方法、装置及终端 |
CN113391882A (zh) * | 2021-06-28 | 2021-09-14 | 北京字节跳动网络技术有限公司 | 虚拟机内存管理方法、装置、存储介质及电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN113391882B (zh) | 2023-12-22 |
CN113391882A (zh) | 2021-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110275723A (zh) | 获取资源的方法、装置、电子设备及可读介质 | |
CN110545313B (zh) | 消息推送控制方法、装置及电子设备 | |
WO2023174013A1 (zh) | 显存分配方法、装置、介质及电子设备 | |
WO2023273564A1 (zh) | 虚拟机内存管理方法、装置、存储介质及电子设备 | |
CN115203210A (zh) | 哈希表处理方法、装置、设备及计算机可读存储介质 | |
CN111324258B (zh) | 多级下拉菜单配置项内容生成方法、装置、设备和介质 | |
CN113391860B (zh) | 服务请求处理方法、装置、电子设备及计算机存储介质 | |
CN117453415A (zh) | 数据审核方法、装置、设备及存储介质 | |
WO2023056841A1 (zh) | 一种数据服务方法、装置及相关产品 | |
CN115545639A (zh) | 金融业务处理方法、装置、电子设备及存储介质 | |
CN112631609B (zh) | 编译方法、装置、终端及存储介质 | |
CN112148448B (zh) | 资源分配方法、装置、设备和计算机可读介质 | |
CN116974732A (zh) | 一种内存处理方法、装置、终端设备及介质 | |
CN115809015A (zh) | 分布式系统中数据处理的方法以及相关系统 | |
CN113204426A (zh) | 资源池的任务处理方法及相关设备 | |
CN111240738A (zh) | 文件处理方法、装置、设备及介质 | |
CN111626787B (zh) | 资源发放方法、装置、介质和设备 | |
CN111831655B (zh) | 一种数据处理的方法、装置、介质和电子设备 | |
WO2023116522A1 (zh) | 进程管理方法、装置、存储介质以及电子设备 | |
CN114625433B (zh) | 应用程序启动方法和系统 | |
CN116820354B (zh) | 数据存储方法、数据存储装置和数据存储系统 | |
CN113448550B (zh) | 实现类的收集管理方法、装置、电子设备及计算机介质 | |
CN117056244A (zh) | 一种内存管理方法、装置、设备及介质 | |
CN118229858A (zh) | 图像处理方法、装置、终端和存储介质 | |
CN113407309A (zh) | 虚拟机内存申请方法、装置、存储介质及电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22831393 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19.04.2024) |